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