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

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

tmp = sum([(p * (p + 1) // 2) / p for p in P[:K]])

ans = tmp

for i in range(N - K):

    tmp -= (P[i] * (P[i] + 1) // 2) / P[i]

    tmp += (P[K + i] * (P[K + i] + 1) // 2) / P[K + i]

    ans = max(ans, tmp)

print(ans)

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

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

tmp = sum([(p + 1) / 2 for p in P[:K]])

ans = tmp

for i in range(N - K):

    tmp = tmp - (P[i] + 1) / 2 + (P[K + i] + 1) / 2

    ans = max(ans, tmp)

print(ans)

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

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

-tmp = sum([(p * (p + 1) // 2) / p for p in P[:K]]) +tmp = sum([(p + 1) / 2 for p in P[:K]]) -    tmp -= (P[i] * (P[i] + 1) // 2) / P[i] -    tmp += (P[K + i] * (P[K + i] + 1) // 2) / P[K + i] +    tmp = tmp - (P[i] + 1) / 2 + (P[K + i] + 1) / 2