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