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

e = [(p[i]+1)/2 for i in range(n)]

tmp = sum(e[:k])
ans = tmp
for i in range(n-k):
    tmp += (e[i+k]-e[i])
    ans = max(ans, tmp)

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

e = [(p[i]+1)/2 for i in range(n)]

tmp = sum(e[:k])
ans = tmp
for i in range(n-k):
    tmp += (e[i+k]-e[i])
    ans = max(ans, tmp)

print(ans)