N, K = map(int, input().split())
arr = list(map(int, input().split()))

jj = 0
koho=[]
for i in range(K):
    jj+=arr[i]
    koho.append(jj)

for i in range(N-K):
    jj+=arr[i+K]
    jj-=arr[i]
    koho.append(jj)

a=max(koho)
print(a/2+(K/2))
 N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K arr = list(map(int, input().split())) arr list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split jj = 0 jj 0 koho=[] koho [] for i in range(K):
    jj+=arr[i]
    koho.append(jj) i range(K) range K jj+=arr[i] jj arr[i] arr i koho.append(jj) koho.append koho append jj for i in range(N-K):
    jj+=arr[i+K]
    jj-=arr[i]
    koho.append(jj) i range(N-K) range N-K N K jj+=arr[i+K] jj arr[i+K] arr i+K i K jj-=arr[i] jj arr[i] arr i koho.append(jj) koho.append koho append jj a=max(koho) a max(koho) max koho print(a/2+(K/2)) print a/2+(K/2) a/2 a 2 K/2 K 2 jj+=arr[i] arr[i] jj N, K = map(int, input().split()) map(int, input().split()) N a=max(koho) max(koho) a jj = 0 0 jj K = map(int, input().split()) map(int, input().split()) K arr = list(map(int, input().split())) list(map(int, input().split())) arr jj-=arr[i] arr[i] jj koho=[] [] koho jj+=arr[i+K] arr[i+K] jj
N, K = map(int, input().split())
arr = list(map(int, input().split()))

jj = 0
koho=[]
for i in range(K):
    jj+=arr[i]
    koho.append(jj)

for i in range(N-K):
    jj+=arr[i+K]
    jj-=arr[i]
    koho.append(jj)

a=max(koho)
print(a/2+(K/2))

