from itertools import accumulate

N, K = list(map(int, input().split()))
P = list(map(lambda x: int(x) + 1, input().split()))
P_cumsum = [0] + list(accumulate(P))
print(max([P_cumsum[i+K]-P_cumsum[i] for i in range(N-K+1)])/2) from itertools import accumulate 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 P = list(map(lambda x: int(x) + 1, input().split())) P list(map(lambda x: int(x) + 1, input().split())) list map(lambda x: int(x) + 1, input().split()) map lambda x: int(x) + 1 int(x) + 1 int(x) int x 1 x input().split() ().split () input split P_cumsum = [0] + list(accumulate(P)) P_cumsum [0] + list(accumulate(P)) [0] 0 list(accumulate(P)) list accumulate(P) accumulate P P_cumsum[i+K]-P_cumsum[i] for i in range(N-K+1) for i in range(N-K+1) i range(N-K+1) range N-K+1 N-K N K 1 for i in range(N-K+1) P_cumsum[i+K]-P_cumsum[i] P_cumsum[i+K] P_cumsum i+K i K P_cumsum[i] P_cumsum i print(max([P_cumsum[i+K]-P_cumsum[i] for i in range(N-K+1)])/2) print max([P_cumsum[i+K]-P_cumsum[i] for i in range(N-K+1)])/2 max([P_cumsum[i+K]-P_cumsum[i] for i in range(N-K+1)]) max [P_cumsum[i+K]-P_cumsum[i] for i in range(N-K+1)] 2 P_cumsum = [0] + list(accumulate(P)) [0] + list(accumulate(P)) P_cumsum K = list(map(int, input().split())) list(map(int, input().split())) K N, K = list(map(int, input().split())) list(map(int, input().split())) N P = list(map(lambda x: int(x) + 1, input().split())) list(map(lambda x: int(x) + 1, input().split())) P
from itertools import accumulate

N, K = list(map(int, input().split()))
P = list(map(lambda x: int(x) + 1, input().split()))
P_cumsum = [0] + list(accumulate(P))
print(max([P_cumsum[i+K]-P_cumsum[i] for i in range(N-K+1)])/2)