import copy

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

s = sum(p[:k])
smax = copy.deepcopy(s)
for i in range(n-k):
    s += p[i+k] - p[i]
    smax = max(smax, s)

print((smax+k)/2) import copy copy 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 s = sum(p[:k]) s sum(p[:k]) sum p[:k] p :k k smax = copy.deepcopy(s) smax copy.deepcopy(s) copy.deepcopy copy deepcopy s for i in range(n-k):
    s += p[i+k] - p[i]
    smax = max(smax, s) i range(n-k) range n-k n k s += p[i+k] - p[i] s p[i+k] - p[i] p[i+k] p i+k i k p[i] p i smax = max(smax, s) smax max(smax, s) max smax s print((smax+k)/2) print (smax+k)/2 smax+k smax k 2 s += p[i+k] - p[i] p[i+k] - p[i] s k = map(int, input().split()) map(int, input().split()) k smax = max(smax, s) max(smax, s) smax s = sum(p[:k]) sum(p[:k]) s smax = copy.deepcopy(s) copy.deepcopy(s) smax p = list(map(int, input().split())) list(map(int, input().split())) p n, k = map(int, input().split()) map(int, input().split()) n
import copy

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

s = sum(p[:k])
smax = copy.deepcopy(s)
for i in range(n-k):
    s += p[i+k] - p[i]
    smax = max(smax, s)

print((smax+k)/2)
