n,k=map(int, input().split())
p=[0]+list(map(int, input().split()))

from itertools import accumulate
acc = list(accumulate(p))

ans = 0
for st in range(n-k+1):
    ans=max(acc[k+st]-acc[st],ans)
    
print((ans+k)/2) n,k=map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k p=[0]+list(map(int, input().split())) p [0]+list(map(int, input().split())) [0] 0 list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split from itertools import accumulate acc = list(accumulate(p)) acc list(accumulate(p)) list accumulate(p) accumulate p ans = 0 ans 0 for st in range(n-k+1):
    ans=max(acc[k+st]-acc[st],ans)
     st range(n-k+1) range n-k+1 n-k n k 1 ans=max(acc[k+st]-acc[st],ans) ans max(acc[k+st]-acc[st],ans) max acc[k+st]-acc[st] acc[k+st] acc k+st k st acc[st] acc st ans print((ans+k)/2) print (ans+k)/2 ans+k ans k 2 p=[0]+list(map(int, input().split())) [0]+list(map(int, input().split())) p k=map(int, input().split()) map(int, input().split()) k ans=max(acc[k+st]-acc[st],ans) max(acc[k+st]-acc[st],ans) ans ans = 0 0 ans n,k=map(int, input().split()) map(int, input().split()) n acc = list(accumulate(p)) list(accumulate(p)) acc
n,k=map(int, input().split())
p=[0]+list(map(int, input().split()))

from itertools import accumulate
acc = list(accumulate(p))

ans = 0
for st in range(n-k+1):
    ans=max(acc[k+st]-acc[st],ans)
    
print((ans+k)/2)