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

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

ans = 0

e = [sum(range(1, pi + 1)) / pi for pi in p]



tmp = 0

for i in range(n):

    tmp += e[i]

    if i >= k:

        tmp -= e[i - k]

    ans = max(ans, tmp)



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

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

ans = 0

e = [(pi + 1) / 2 for pi in p]



tmp = 0

for i in range(n):

    tmp += e[i]

    if i >= k:

        tmp -= e[i - k]

    ans = max(ans, tmp)



print(ans)
n, k = list(map(int, input().split()))
p = list(map(int, input().split()))
ans = 0
e = [sum(range(1, pi + 1)) / pi for pi in p]
tmp = 0
for i in range(n):
    tmp += e[i]
    if i >= k:
        tmp -= e[i - k]
    ans = max(ans, tmp)
print(ans)

n, k = list(map(int, input().split()))
p = list(map(int, input().split()))
ans = 0
e = [(pi + 1) / 2 for pi in p]
tmp = 0
for i in range(n):
    tmp += e[i]
    if i >= k:
        tmp -= e[i - k]
    ans = max(ans, tmp)
print(ans)

-e = [sum(range(1, pi + 1)) / pi for pi in p] +e = [(pi + 1) / 2 for pi in p]