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

for i in range(N):
  p[i]=(1+p[i])/2
  
ans=[0]*(N-K+1)
ans[0]=sum(p[:K])
for i in range(1, N-K+1):
  ans[i]=ans[i-1]-p[i-1]+p[i+K-1]

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

for i in range(N):
  p[i]=(1+p[i])/2
  
ans=[0]*(N-K+1)
ans[0]=sum(p[:K])
for i in range(1, N-K+1):
  ans[i]=ans[i-1]-p[i-1]+p[i+K-1]

print(max(ans))