from itertools import accumulate
N, K = map(int, input().split())
P = list(map(int, input().split()))

P = [((x+1) * x / 2) / x for x in P]
A = list(accumulate(P))

ans = A[K-1]
for i in range(K, N):
    ans = max(ans, A[i] - A[i-K])

print(ans) from itertools import accumulate N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K P = list(map(int, input().split())) P list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split ((x+1) * x / 2) / x for x in P for x in P x P for x in P ((x+1) * x / 2) / x (x+1) * x / 2 (x+1) * x x+1 x 1 x 2 x P = [((x+1) * x / 2) / x for x in P] P [((x+1) * x / 2) / x for x in P] A = list(accumulate(P)) A list(accumulate(P)) list accumulate(P) accumulate P ans = A[K-1] ans A[K-1] A K-1 K 1 for i in range(K, N):
    ans = max(ans, A[i] - A[i-K]) i range(K, N) range K N ans = max(ans, A[i] - A[i-K]) ans max(ans, A[i] - A[i-K]) max ans A[i] - A[i-K] A[i] A i A[i-K] A i-K i K print(ans) print ans N, K = map(int, input().split()) map(int, input().split()) N P = [((x+1) * x / 2) / x for x in P] [((x+1) * x / 2) / x for x in P] P P = list(map(int, input().split())) list(map(int, input().split())) P A = list(accumulate(P)) list(accumulate(P)) A ans = A[K-1] A[K-1] ans K = map(int, input().split()) map(int, input().split()) K ans = max(ans, A[i] - A[i-K]) max(ans, A[i] - A[i-K]) ans
from itertools import accumulate
N, K = map(int, input().split())
P = list(map(int, input().split()))

P = [((x+1) * x / 2) / x for x in P]
A = list(accumulate(P))

ans = A[K-1]
for i in range(K, N):
    ans = max(ans, A[i] - A[i-K])

print(ans)
