n, k = map(int, input().split())
ps = list(map(int, input().split()))
acc = 0
for i in range(k):
    acc += ps[i]
max_a = acc
for i in range(1,n-k+1):
    acc -= ps[i-1]
    acc += ps[i+k-1]
    max_a = max(max_a, acc)
print((max_a+k)/2) n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k ps = list(map(int, input().split())) ps list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split acc = 0 acc 0 for i in range(k):
    acc += ps[i] i range(k) range k acc += ps[i] acc ps[i] ps i max_a = acc max_a acc for i in range(1,n-k+1):
    acc -= ps[i-1]
    acc += ps[i+k-1]
    max_a = max(max_a, acc) i range(1,n-k+1) range 1 n-k+1 n-k n k 1 acc -= ps[i-1] acc ps[i-1] ps i-1 i 1 acc += ps[i+k-1] acc ps[i+k-1] ps i+k-1 i+k i k 1 max_a = max(max_a, acc) max_a max(max_a, acc) max max_a acc print((max_a+k)/2) print (max_a+k)/2 max_a+k max_a k 2 k = map(int, input().split()) map(int, input().split()) k acc += ps[i] ps[i] acc max_a = max(max_a, acc) max(max_a, acc) max_a acc = 0 0 acc ps = list(map(int, input().split())) list(map(int, input().split())) ps n, k = map(int, input().split()) map(int, input().split()) n acc -= ps[i-1] ps[i-1] acc acc += ps[i+k-1] ps[i+k-1] acc max_a = acc acc max_a
n, k = map(int, input().split())
ps = list(map(int, input().split()))
acc = 0
for i in range(k):
    acc += ps[i]
max_a = acc
for i in range(1,n-k+1):
    acc -= ps[i-1]
    acc += ps[i+k-1]
    max_a = max(max_a, acc)
print((max_a+k)/2)