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