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