n,k = map(int, input().split())
p = list(map(lambda x: (int(x)+1)/2, input().split()))

t = sum(p[:k])
ans = t
for i in range(k,n):
  t += p[i] - p[i-k]
  if ans < t: ans = t
print(ans) n,k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k p = list(map(lambda x: (int(x)+1)/2, input().split())) p list(map(lambda x: (int(x)+1)/2, input().split())) list map(lambda x: (int(x)+1)/2, input().split()) map lambda x: (int(x)+1)/2 (int(x)+1)/2 int(x)+1 int(x) int x 1 2 x input().split() ().split () input split t = sum(p[:k]) t sum(p[:k]) sum p[:k] p :k k ans = t ans t for i in range(k,n):
  t += p[i] - p[i-k]
  if ans < t: ans = t i range(k,n) range k n t += p[i] - p[i-k] t p[i] - p[i-k] p[i] p i p[i-k] p i-k i k if ans < t: ans = ans < t ans t print(ans) print ans t += p[i] - p[i-k] p[i] - p[i-k] t t = sum(p[:k]) sum(p[:k]) t ans = t t ans n,k = map(int, input().split()) map(int, input().split()) n k = map(int, input().split()) map(int, input().split()) k p = list(map(lambda x: (int(x)+1)/2, input().split())) list(map(lambda x: (int(x)+1)/2, input().split())) p
n,k = map(int, input().split())
p = list(map(lambda x: (int(x)+1)/2, input().split()))

t = sum(p[:k])
ans = t
for i in range(k,n):
  t += p[i] - p[i-k]
  if ans < t: ans = t
print(ans)