from itertools import accumulate
N, K = map(int, input().split())
P = list(map(int, input().split()))
acc = [0] + list(accumulate(P))
ans = 0
for a, b in zip(acc, acc[K:]):
  exp = (b - a + K) / 2
  ans = max(exp, ans)
print(ans) from itertools import accumulate 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 acc = [0] + list(accumulate(P)) acc [0] + list(accumulate(P)) [0] 0 list(accumulate(P)) list accumulate(P) accumulate P ans = 0 ans 0 for a, b in zip(acc, acc[K:]):
  exp = (b - a + K) / 2
  ans = max(exp, ans) a b zip(acc, acc[K:]) zip acc acc[K:] acc K: K exp = (b - a + K) / 2 exp (b - a + K) / 2 b - a + K b - a b a K 2 ans = max(exp, ans) ans max(exp, ans) max exp ans print(ans) print ans exp = (b - a + K) / 2 (b - a + K) / 2 exp ans = max(exp, ans) max(exp, ans) ans P = list(map(int, input().split())) list(map(int, input().split())) P acc = [0] + list(accumulate(P)) [0] + list(accumulate(P)) acc N, K = map(int, input().split()) map(int, input().split()) N ans = 0 0 ans K = map(int, input().split()) map(int, input().split()) K
from itertools import accumulate
N, K = map(int, input().split())
P = list(map(int, input().split()))
acc = [0] + list(accumulate(P))
ans = 0
for a, b in zip(acc, acc[K:]):
  exp = (b - a + K) / 2
  ans = max(exp, ans)
print(ans)