N, K = map(int, input().split())
expectation = list(map(lambda x: (x+1) / 2, map(int, input().split())))
cur_expectation = sum(expectation[:K])
max_expectation = cur_expectation
for i in range(N - K):
    cur_expectation -= expectation[i]
    cur_expectation += expectation[i + K]
    if cur_expectation > max_expectation:
        max_expectation = cur_expectation
print(max_expectation) N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K expectation = list(map(lambda x: (x+1) / 2, map(int, input().split()))) expectation list(map(lambda x: (x+1) / 2, map(int, input().split()))) list map(lambda x: (x+1) / 2, map(int, input().split())) map lambda x: (x+1) / 2 (x+1) / 2 x+1 x 1 2 x map(int, input().split()) map int input().split() ().split () input split cur_expectation = sum(expectation[:K]) cur_expectation sum(expectation[:K]) sum expectation[:K] expectation :K K max_expectation = cur_expectation max_expectation cur_expectation for i in range(N - K):
    cur_expectation -= expectation[i]
    cur_expectation += expectation[i + K]
    if cur_expectation > max_expectation:
        max_expectation = cur_expectation i range(N - K) range N - K N K cur_expectation -= expectation[i] cur_expectation expectation[i] expectation i cur_expectation += expectation[i + K] cur_expectation expectation[i + K] expectation i + K i K if cur_expectation > max_expectation:
        max_expectation = cur_expectation cur_expectation > max_expectation cur_expectation max_expectation max_expectation = cur_expectation max_expectation cur_expectation print(max_expectation) print max_expectation max_expectation = cur_expectation cur_expectation max_expectation cur_expectation -= expectation[i] expectation[i] cur_expectation N, K = map(int, input().split()) map(int, input().split()) N expectation = list(map(lambda x: (x+1) / 2, map(int, input().split()))) list(map(lambda x: (x+1) / 2, map(int, input().split()))) expectation K = map(int, input().split()) map(int, input().split()) K cur_expectation += expectation[i + K] expectation[i + K] cur_expectation cur_expectation = sum(expectation[:K]) sum(expectation[:K]) cur_expectation max_expectation = cur_expectation cur_expectation max_expectation
N, K = map(int, input().split())
expectation = list(map(lambda x: (x+1) / 2, map(int, input().split())))
cur_expectation = sum(expectation[:K])
max_expectation = cur_expectation
for i in range(N - K):
    cur_expectation -= expectation[i]
    cur_expectation += expectation[i + K]
    if cur_expectation > max_expectation:
        max_expectation = cur_expectation
print(max_expectation)
