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

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

P = pow(1 / 6, K)



now = sum([a * (a + 1) // 2 / a for a in A[:K - 1]])

ans = 0

for left, right in zip(A, A[K - 1:]):

    now += right * (right + 1) // 2 / right

    ans = max(ans, now)

    now -= left * (left + 1) // 2 / left



print(('{:.10f}'.format(ans)))

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

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



Q = [(p + 1) / 2 for p in P]

now = sum(Q[:K])

ans = now

for i in range(N - K):

    now -= Q[i]

    now += Q[i + K]

    ans = max(ans, now)

print(ans)
N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
P = pow(1 / 6, K)
now = sum([a * (a + 1) // 2 / a for a in A[: K - 1]])
ans = 0
for left, right in zip(A, A[K - 1 :]):
    now += right * (right + 1) // 2 / right
    ans = max(ans, now)
    now -= left * (left + 1) // 2 / left
print(("{:.10f}".format(ans)))

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

-A = list(map(int, input().split())) -P = pow(1 / 6, K) -now = sum([a * (a + 1) // 2 / a for a in A[: K - 1]]) -ans = 0 -for left, right in zip(A, A[K - 1 :]): -    now += right * (right + 1) // 2 / right +P = list(map(int, input().split())) +Q = [(p + 1) / 2 for p in P] +now = sum(Q[:K]) +ans = now +for i in range(N - K): +    now -= Q[i] +    now += Q[i + K] -    now -= left * (left + 1) // 2 / left -print(("{:.10f}".format(ans))) +print(ans)