n, k = list(map(int, input().split()))

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

for i in range(n):

    p[i] = (p[i] * -~p[i]) / 2 / p[i]

ans = v = sum(p[:k])

for i in range(n - k):

    v = v - p[i] + p[k + i]

    ans = max(ans, v)

print(ans)

n, k = list(map(int, input().split()))

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

for i in range(n):

    p[i] = -~p[i] / 2

ans = v = sum(p[:k])

for i in range(n - k):

    v = v - p[i] + p[k + i]

    ans = max(ans, v)

print(ans)

n, k = list(map(int, input().split()))
p = list(map(int, input().split()))
for i in range(n):
    p[i] = (p[i] * -~p[i]) / 2 / p[i]
ans = v = sum(p[:k])
for i in range(n - k):
    v = v - p[i] + p[k + i]
    ans = max(ans, v)
print(ans)

n, k = list(map(int, input().split()))
p = list(map(int, input().split()))
for i in range(n):
    p[i] = -~p[i] / 2
ans = v = sum(p[:k])
for i in range(n - k):
    v = v - p[i] + p[k + i]
    ans = max(ans, v)
print(ans)

-    p[i] = (p[i] * -~p[i]) / 2 / p[i] +    p[i] = -~p[i] / 2