#!/usr/bin/env python3
n, k, *P = map(int, open(0).read().split())
p = [(i + 1) / 2 for i in P]
c = sum(p[:k])
ans = c
for i in range(n - k):
    c = c + p[i + k] - p[i]
    ans = max(c, ans)
print(ans) n, k, *P = map(int, open(0).read().split()) n map(int, open(0).read().split()) map int open(0).read().split() (0).read().split (0).read() (0).read (0) open 0 read split k *P P (i + 1) / 2 for i in P for i in P i P for i in P (i + 1) / 2 i + 1 i 1 2 p = [(i + 1) / 2 for i in P] p [(i + 1) / 2 for i in P] c = sum(p[:k]) c sum(p[:k]) sum p[:k] p :k k ans = c ans c for i in range(n - k):
    c = c + p[i + k] - p[i]
    ans = max(c, ans) i range(n - k) range n - k n k c = c + p[i + k] - p[i] c c + p[i + k] - p[i] c + p[i + k] c p[i + k] p i + k i k p[i] p i ans = max(c, ans) ans max(c, ans) max c ans print(ans) print ans p = [(i + 1) / 2 for i in P] [(i + 1) / 2 for i in P] p n, k, *P = map(int, open(0).read().split()) map(int, open(0).read().split()) n k, *P = map(int, open(0).read().split()) map(int, open(0).read().split()) k c = sum(p[:k]) sum(p[:k]) c c = c + p[i + k] - p[i] c + p[i + k] - p[i] c ans = max(c, ans) max(c, ans) ans ans = c c ans
#!/usr/bin/env python3
n, k, *P = map(int, open(0).read().split())
p = [(i + 1) / 2 for i in P]
c = sum(p[:k])
ans = c
for i in range(n - k):
    c = c + p[i + k] - p[i]
    ans = max(c, ans)
print(ans)
