N, K = list(map(int, input().split()))
E = list(map(lambda x: (float(x) + 1) / 2, input().split()))
res = sum(E[:K])
t = res
for i in range(K, N):
    t += -E[i - K] + E[i]
    res = max(res, t)
print(res) N, K = list(map(int, input().split())) N list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split K E = list(map(lambda x: (float(x) + 1) / 2, input().split())) E list(map(lambda x: (float(x) + 1) / 2, input().split())) list map(lambda x: (float(x) + 1) / 2, input().split()) map lambda x: (float(x) + 1) / 2 (float(x) + 1) / 2 float(x) + 1 float(x) float x 1 2 x input().split() ().split () input split res = sum(E[:K]) res sum(E[:K]) sum E[:K] E :K K t = res t res for i in range(K, N):
    t += -E[i - K] + E[i]
    res = max(res, t) i range(K, N) range K N t += -E[i - K] + E[i] t -E[i - K] + E[i] -E[i - K] E[i - K] E i - K i K E[i] E i res = max(res, t) res max(res, t) max res t print(res) print res t += -E[i - K] + E[i] -E[i - K] + E[i] t res = max(res, t) max(res, t) res N, K = list(map(int, input().split())) list(map(int, input().split())) N t = res res t E = list(map(lambda x: (float(x) + 1) / 2, input().split())) list(map(lambda x: (float(x) + 1) / 2, input().split())) E K = list(map(int, input().split())) list(map(int, input().split())) K res = sum(E[:K]) sum(E[:K]) res
N, K = list(map(int, input().split()))
E = list(map(lambda x: (float(x) + 1) / 2, input().split()))
res = sum(E[:K])
t = res
for i in range(K, N):
    t += -E[i - K] + E[i]
    res = max(res, t)
print(res)
