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