N, K = map(int, input().split())
P = list(map(int, input().split()))
ans = 0
for i in range(K):
    ans += (P[i]+1)/2

tmp = ans
for i in range(K, N):
    tmp = tmp + (P[i]+1)/2 - (P[i-K]+1)/2
    ans = max(ans, tmp)

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

tmp = ans
for i in range(K, N):
    tmp = tmp + (P[i]+1)/2 - (P[i-K]+1)/2
    ans = max(ans, tmp)

print(ans)