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

p = [(int(s)+1)/2 for s in input().split()]

l = [sum(p[:k])]

for i in range(n-k):

  l.append(l[i]-p[i]+p[i+k])

print((max(l)))
n,k = list(map(int,input().split()))

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

P1 = sum(p[:k])

ans = P1

for i in range(k,n):

    P1 +=(p[i]-p[i-k])

    if ans < P1:

        ans = P1

print(((ans+k)/2))
n, k = list(map(int, input().split()))
p = [(int(s) + 1) / 2 for s in input().split()]
l = [sum(p[:k])]
for i in range(n - k):
    l.append(l[i] - p[i] + p[i + k])
print((max(l)))

n, k = list(map(int, input().split()))
p = list(map(int, input().split()))
P1 = sum(p[:k])
ans = P1
for i in range(k, n):
    P1 += p[i] - p[i - k]
    if ans < P1:
        ans = P1
print(((ans + k) / 2))

-p = [(int(s) + 1) / 2 for s in input().split()] -l = [sum(p[:k])] -for i in range(n - k): -    l.append(l[i] - p[i] + p[i + k]) -print((max(l))) +p = list(map(int, input().split())) +P1 = sum(p[:k]) +ans = P1 +for i in range(k, n): +    P1 += p[i] - p[i - k] +    if ans < P1: +        ans = P1 +print(((ans + k) / 2))