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

E = []

for i in range(N):
    E.append((P[i]+1)/2)

tnt = sum(E[:K])
ans = tnt

for i in range(N-K):
    tnt = tnt + E[K+i] - E[i]
    ans = max(ans, tnt)

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

E = []

for i in range(N):
    E.append((P[i]+1)/2)

tnt = sum(E[:K])
ans = tnt

for i in range(N-K):
    tnt = tnt + E[K+i] - E[i]
    ans = max(ans, tnt)

print(ans)
