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

#期待値 : (p+1)//2
range_total = sum(P[:K]) + K
max_value = range_total
for i in range(N-K):
    range_total += P[K+i] - P[i]
    max_value = max(max_value, range_total)
print(max_value / 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 range_total = sum(P[:K]) + K range_total sum(P[:K]) + K sum(P[:K]) sum P[:K] P :K K K max_value = range_total max_value range_total for i in range(N-K):
    range_total += P[K+i] - P[i]
    max_value = max(max_value, range_total) i range(N-K) range N-K N K range_total += P[K+i] - P[i] range_total P[K+i] - P[i] P[K+i] P K+i K i P[i] P i max_value = max(max_value, range_total) max_value max(max_value, range_total) max max_value range_total print(max_value / 2) print max_value / 2 max_value 2 N,K = map(int, input().split()) map(int, input().split()) N range_total = sum(P[:K]) + K sum(P[:K]) + K range_total P = list(map(int, input().split())) list(map(int, input().split())) P max_value = max(max_value, range_total) max(max_value, range_total) max_value K = map(int, input().split()) map(int, input().split()) K max_value = range_total range_total max_value range_total += P[K+i] - P[i] P[K+i] - P[i] range_total
N,K = map(int, input().split())
P = list(map(int, input().split()))

#期待値 : (p+1)//2
range_total = sum(P[:K]) + K
max_value = range_total
for i in range(N-K):
    range_total += P[K+i] - P[i]
    max_value = max(max_value, range_total)
print(max_value / 2)