N, K = list(map(int, input().split()))

p = list([(int(x)+1)/2 for x in input().split()])



_sum = sum(p[:K])

ans = _sum

for i in range(N-K):

    _sum -= p[i]

    _sum += p[i+K]

    ans = max(ans, _sum)

print(ans)

N, K = list(map(int, input().split()))

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



s = sum((pi+1)/2 for pi in p[:K])

m = s

for i, pi in enumerate(p):

    if i < K:

        continue

    s -= (p[i-K]+1)/2

    s += (p[i]+1)/2

    if s > m:

        m = s



print(m)

N, K = list(map(int, input().split()))
p = list([(int(x) + 1) / 2 for x in input().split()])
_sum = sum(p[:K])
ans = _sum
for i in range(N - K):
    _sum -= p[i]
    _sum += p[i + K]
    ans = max(ans, _sum)
print(ans)

N, K = list(map(int, input().split()))
p = list(map(int, input().split()))
s = sum((pi + 1) / 2 for pi in p[:K])
m = s
for i, pi in enumerate(p):
    if i < K:
        continue
    s -= (p[i - K] + 1) / 2
    s += (p[i] + 1) / 2
    if s > m:
        m = s
print(m)

-p = list([(int(x) + 1) / 2 for x in input().split()]) -_sum = sum(p[:K]) -ans = _sum -for i in range(N - K): -    _sum -= p[i] -    _sum += p[i + K] -    ans = max(ans, _sum) -print(ans) +p = list(map(int, input().split())) +s = sum((pi + 1) / 2 for pi in p[:K]) +m = s +for i, pi in enumerate(p): +    if i < K: +        continue +    s -= (p[i - K] + 1) / 2 +    s += (p[i] + 1) / 2 +    if s > m: +        m = s +print(m)