n, k = map(int, input().split())
p = list(map(int, input().split()))
l = [(i + 1) / 2 for i in p]
now = ans = sum(l[:k])

for i in range(1, n - k + 1):
    now += l[i + k - 1] - l[i - 1]
    ans = max(ans, now)

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

for i in range(1, n - k + 1):
    now += l[i + k - 1] - l[i - 1]
    ans = max(ans, now)

print(ans)