n,k=map(int,input().split())
p=list(map(int,input().split()))
ans=sum(p[0:k])+k
s=sum(p[0:k])+k
for i in range(1,n-k+1):
    s+=-p[i-1]+p[i+k-1]
    if ans<s:
        ans=s
print(ans/2) 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 ans=sum(p[0:k])+k ans sum(p[0:k])+k sum(p[0:k]) sum p[0:k] p 0:k 0 k k s=sum(p[0:k])+k s sum(p[0:k])+k sum(p[0:k]) sum p[0:k] p 0:k 0 k k for i in range(1,n-k+1):
    s+=-p[i-1]+p[i+k-1]
    if ans<s:
        ans=s i range(1,n-k+1) range 1 n-k+1 n-k n k 1 s+=-p[i-1]+p[i+k-1] s -p[i-1]+p[i+k-1] -p[i-1] p[i-1] p i-1 i 1 p[i+k-1] p i+k-1 i+k i k 1 if ans<s:
        ans=s ans<s ans s ans=s ans s print(ans/2) print ans/2 ans 2 p=list(map(int,input().split())) list(map(int,input().split())) p ans=sum(p[0:k])+k sum(p[0:k])+k ans s+=-p[i-1]+p[i+k-1] -p[i-1]+p[i+k-1] s ans=s s ans n,k=map(int,input().split()) map(int,input().split()) n k=map(int,input().split()) map(int,input().split()) k s=sum(p[0:k])+k sum(p[0:k])+k s
n,k=map(int,input().split())
p=list(map(int,input().split()))
ans=sum(p[0:k])+k
s=sum(p[0:k])+k
for i in range(1,n-k+1):
    s+=-p[i-1]+p[i+k-1]
    if ans<s:
        ans=s
print(ans/2)