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

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



e = [0]*n



for i in range(n):

  e[i] = (l[i]+1)/2



from itertools import accumulate

a = [0] + e

b = list(accumulate(a))



ans = 0

for i in range(n-k+1):

  ans = max(ans, b[i+k]-b[i])

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

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



P = [(p+1)/2 for p in P]



from itertools import accumulate

Q = [0]+P

Q = list(accumulate(Q))



ans = 0

for i in range(n-k+1):

    ans = max(ans, Q[i+k]-Q[i])

print(ans)

n, k = list(map(int, input().split()))
l = list(map(int, input().split()))
e = [0] * n
for i in range(n):
    e[i] = (l[i] + 1) / 2
from itertools import accumulate

a = [0] + e
b = list(accumulate(a))
ans = 0
for i in range(n - k + 1):
    ans = max(ans, b[i + k] - b[i])
print(ans)

n, k = list(map(int, input().split()))
P = list(map(int, input().split()))
P = [(p + 1) / 2 for p in P]
from itertools import accumulate

Q = [0] + P
Q = list(accumulate(Q))
ans = 0
for i in range(n - k + 1):
    ans = max(ans, Q[i + k] - Q[i])
print(ans)

-l = list(map(int, input().split())) -e = [0] * n -for i in range(n): -    e[i] = (l[i] + 1) / 2 +P = list(map(int, input().split())) +P = [(p + 1) / 2 for p in P] -a = [0] + e -b = list(accumulate(a)) +Q = [0] + P +Q = list(accumulate(Q)) -    ans = max(ans, b[i + k] - b[i]) +    ans = max(ans, Q[i + k] - Q[i])