from itertools import accumulate

N, K = list(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 = list(map(int, input().split()))

P = list(map(int, input().split()))

acc = [0] + list(accumulate(P))

print(((max(b - a for a, b in zip(acc, acc[K:])) + K) / 2))
from itertools import accumulate

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

-ans = 0 -for a, b in zip(acc, acc[K:]): -    exp = (b - a + K) / 2 -    ans = max(exp, ans) -print(ans) +print(((max(b - a for a, b in zip(acc, acc[K:])) + K) / 2))