from itertools import accumulate



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

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



Es = [p*(p+1)/2/p for p in ps]



accEs = list(accumulate([0]+Es))



ans = 0

for i in range(N-K+1):

    e = accEs[i+K] - accEs[i]

    ans = max(ans, e)



print(ans)

from itertools import accumulate



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

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



Es = [(P+1)/2 for P in Ps]

accEs = list(accumulate([0]+Es))



ans = 0.0

for i in range(N-K+1):

    e = accEs[i+K] - accEs[i]

    if e > ans:

        ans = e



print(ans)

from itertools import accumulate

N, K = list(map(int, input().split()))
ps = list(map(int, input().split()))
Es = [p * (p + 1) / 2 / p for p in ps]
accEs = list(accumulate([0] + Es))
ans = 0
for i in range(N - K + 1):
    e = accEs[i + K] - accEs[i]
    ans = max(ans, e)
print(ans)

from itertools import accumulate

N, K = list(map(int, input().split()))
Ps = list(map(int, input().split()))
Es = [(P + 1) / 2 for P in Ps]
accEs = list(accumulate([0] + Es))
ans = 0.0
for i in range(N - K + 1):
    e = accEs[i + K] - accEs[i]
    if e > ans:
        ans = e
print(ans)

-ps = list(map(int, input().split())) -Es = [p * (p + 1) / 2 / p for p in ps] +Ps = list(map(int, input().split())) +Es = [(P + 1) / 2 for P in Ps] -ans = 0 +ans = 0.0 -    ans = max(ans, e) +    if e > ans: +        ans = e