from itertools import accumulate

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

xs = [0] + list(accumulate(map(lambda v: (1 + v) * v // 2 / v, p)))
ans = 0
for i in range(n - k + 1):
    ans = max(ans, xs[i + k] - xs[i])
print(ans) from itertools import accumulate 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 xs = [0] + list(accumulate(map(lambda v: (1 + v) * v // 2 / v, p))) xs [0] + list(accumulate(map(lambda v: (1 + v) * v // 2 / v, p))) [0] 0 list(accumulate(map(lambda v: (1 + v) * v // 2 / v, p))) list accumulate(map(lambda v: (1 + v) * v // 2 / v, p)) accumulate map(lambda v: (1 + v) * v // 2 / v, p) map lambda v: (1 + v) * v // 2 / v (1 + v) * v // 2 / v (1 + v) * v // 2 (1 + v) * v 1 + v 1 v v 2 v v p ans = 0 ans 0 for i in range(n - k + 1):
    ans = max(ans, xs[i + k] - xs[i]) i range(n - k + 1) range n - k + 1 n - k n k 1 ans = max(ans, xs[i + k] - xs[i]) ans max(ans, xs[i + k] - xs[i]) max ans xs[i + k] - xs[i] xs[i + k] xs i + k i k xs[i] xs i print(ans) print ans p = list(map(int, input().split())) list(map(int, input().split())) p k = map(int, input().split()) map(int, input().split()) k xs = [0] + list(accumulate(map(lambda v: (1 + v) * v // 2 / v, p))) [0] + list(accumulate(map(lambda v: (1 + v) * v // 2 / v, p))) xs ans = 0 0 ans ans = max(ans, xs[i + k] - xs[i]) max(ans, xs[i + k] - xs[i]) ans n, k = map(int, input().split()) map(int, input().split()) n
from itertools import accumulate

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

xs = [0] + list(accumulate(map(lambda v: (1 + v) * v // 2 / v, p)))
ans = 0
for i in range(n - k + 1):
    ans = max(ans, xs[i + k] - xs[i])
print(ans)
