N,K = map(int,input().split())
P = list(map(int,input().split()))
ls = [0] * (N + 1)

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

for i in range(N):
  ls[i+1] += ls[i] + (P[i] + 1) / 2
  
ans = 0
for j in range(N-K+1):
  tmp = ls[K+j] - ls[j]
  ans = max(ans, tmp)
  
print(ans)