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