n, k = map(int, input().split())
p = list(map(int, input().split()))
e = []

for i in range(n):
    e.append(p[i] + 1)

sum_e = [0]

for i in range(1,n+1):
    sum_e.append(sum_e[i-1]+e[i-1])

ans = []

for i in range(n-k+1):
    ans.append(sum_e[i+k]-sum_e[i])

print(max(ans)/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 e = [] e [] for i in range(n):
    e.append(p[i] + 1) i range(n) range n e.append(p[i] + 1) e.append e append p[i] + 1 p[i] p i 1 sum_e = [0] sum_e [0] 0 for i in range(1,n+1):
    sum_e.append(sum_e[i-1]+e[i-1]) i range(1,n+1) range 1 n+1 n 1 sum_e.append(sum_e[i-1]+e[i-1]) sum_e.append sum_e append sum_e[i-1]+e[i-1] sum_e[i-1] sum_e i-1 i 1 e[i-1] e i-1 i 1 ans = [] ans [] for i in range(n-k+1):
    ans.append(sum_e[i+k]-sum_e[i]) i range(n-k+1) range n-k+1 n-k n k 1 ans.append(sum_e[i+k]-sum_e[i]) ans.append ans append sum_e[i+k]-sum_e[i] sum_e[i+k] sum_e i+k i k sum_e[i] sum_e i print(max(ans)/2) print max(ans)/2 max(ans) max ans 2 p = list(map(int, input().split())) list(map(int, input().split())) p n, k = map(int, input().split()) map(int, input().split()) n k = map(int, input().split()) map(int, input().split()) k e = [] [] e sum_e = [0] [0] sum_e ans = [] [] ans
n, k = map(int, input().split())
p = list(map(int, input().split()))
e = []

for i in range(n):
    e.append(p[i] + 1)

sum_e = [0]

for i in range(1,n+1):
    sum_e.append(sum_e[i-1]+e[i-1])

ans = []

for i in range(n-k+1):
    ans.append(sum_e[i+k]-sum_e[i])

print(max(ans)/2)