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

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



p = [0]

for i in range(N):

    p.append(p[-1] + (P[i] + 1) / 2)



print((max(p[i+K] - p[i] for i in range(N-K+1))))

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

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



p = [0]

for i in range(N):

    p.append(p[-1] + (P[i] + 1) / 2)



print((max([p[j + K] - p[j] for j in range(N - K + 1)])))

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

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

-P = list(map(float, input().split())) +P = list(map(int, input().split())) -print((max(p[i + K] - p[i] for i in range(N - K + 1)))) +print((max([p[j + K] - p[j] for j in range(N - K + 1)])))