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 = list(map(int, input().split()))

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



cur = sum((X[i] + 1) / 2 for i in range(K))

ans = cur

for i in range(K, N):

    cur += (X[i] + 1) / 2 - (X[i - K] + 1) / 2

    ans = max(ans, cur)



print(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 = list(map(int, input().split()))
X = list(map(int, input().split()))
cur = sum((X[i] + 1) / 2 for i in range(K))
ans = cur
for i in range(K, N):
    cur += (X[i] + 1) / 2 - (X[i - K] + 1) / 2
    ans = max(ans, cur)
print(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 +N, K = list(map(int, input().split())) +X = list(map(int, input().split())) +cur = sum((X[i] + 1) / 2 for i in range(K)) +ans = cur -    res = res - y[i - K] + y[i] -    ans = max(ans, res) +    cur += (X[i] + 1) / 2 - (X[i - K] + 1) / 2 +    ans = max(ans, cur)