N, K, *P = list(map(int, open(0).read().split()))



A = [0]

for i in range(1, 1001):

    A.append(A[-1] + i)

B = [0] + [A[i] / i for i in range(1, 1001)]



Q = [B[p] for p in P]

ans = [sum(Q[:K])]

for i in range(N - K):

    ans.append(ans[-1] - Q[i] + Q[i + K])

    

print((max(ans)))

N, K, *X = list(map(int, open(0).read().split()))



y = [float(x * (x + 1) / 2 / x) for x in X]

ans = sum(y[:K])

res = ans

for i in range(K, N):

    res = res - y[i - K] + y[i]

    ans = max(ans, res)

print(ans)

N, K, *P = list(map(int, open(0).read().split()))
A = [0]
for i in range(1, 1001):
    A.append(A[-1] + i)
B = [0] + [A[i] / i for i in range(1, 1001)]
Q = [B[p] for p in P]
ans = [sum(Q[:K])]
for i in range(N - K):
    ans.append(ans[-1] - Q[i] + Q[i + K])
print((max(ans)))

N, K, *X = list(map(int, open(0).read().split()))
y = [float(x * (x + 1) / 2 / x) for x in X]
ans = sum(y[:K])
res = ans
for i in range(K, N):
    res = res - y[i - K] + y[i]
    ans = max(ans, res)
print(ans)

-N, K, *P = list(map(int, open(0).read().split())) -A = [0] -for i in range(1, 1001): -    A.append(A[-1] + i) -B = [0] + [A[i] / i for i in range(1, 1001)] -Q = [B[p] for p in P] -ans = [sum(Q[:K])] -for i in range(N - K): -    ans.append(ans[-1] - Q[i] + Q[i + K]) -print((max(ans))) +N, K, *X = list(map(int, open(0).read().split())) +y = [float(x * (x + 1) / 2 / x) for x in X] +ans = sum(y[:K]) +res = ans +for i in range(K, N): +    res = res - y[i - K] + y[i] +    ans = max(ans, res) +print(ans)