n, k = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a[:k])
mx = s
for i in range(k, n):
    s += a[i] - a[i - k]
    mx = max(mx, s)
print((mx + k) / 2) n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k a = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split s = sum(a[:k]) s sum(a[:k]) sum a[:k] a :k k mx = s mx s for i in range(k, n):
    s += a[i] - a[i - k]
    mx = max(mx, s) i range(k, n) range k n s += a[i] - a[i - k] s a[i] - a[i - k] a[i] a i a[i - k] a i - k i k mx = max(mx, s) mx max(mx, s) max mx s print((mx + k) / 2) print (mx + k) / 2 mx + k mx k 2 n, k = map(int, input().split()) map(int, input().split()) n k = map(int, input().split()) map(int, input().split()) k s += a[i] - a[i - k] a[i] - a[i - k] s mx = max(mx, s) max(mx, s) mx s = sum(a[:k]) sum(a[:k]) s a = list(map(int, input().split())) list(map(int, input().split())) a mx = s s mx
n, k = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a[:k])
mx = s
for i in range(k, n):
    s += a[i] - a[i - k]
    mx = max(mx, s)
print((mx + k) / 2)