N, K = list(map(int, input().split()))

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

s = [0] * 1000000

for i in range(N):

    s[i+1] = s[i] + A[i]



max_s = 0

for i in range(N):

    if max_s < s[i+K] - s[i]:

        max_s = s[i+K] - s[i]





print(((max_s+K) / 2))
N, K = list(map(int, input().split()))

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



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



t = sum(m[0:K])

result = t

for i in range(N - K):

    t -= m[i]

    t += m[i + K]

    if t > result:

        result = t

print(result)
N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
s = [0] * 1000000
for i in range(N):
    s[i + 1] = s[i] + A[i]
max_s = 0
for i in range(N):
    if max_s < s[i + K] - s[i]:
        max_s = s[i + K] - s[i]
print(((max_s + K) / 2))

N, K = list(map(int, input().split()))
p = list(map(int, input().split()))
m = [(e + 1) / 2 for e in p]
t = sum(m[0:K])
result = t
for i in range(N - K):
    t -= m[i]
    t += m[i + K]
    if t > result:
        result = t
print(result)

-A = list(map(int, input().split())) -s = [0] * 1000000 -for i in range(N): -    s[i + 1] = s[i] + A[i] -max_s = 0 -for i in range(N): -    if max_s < s[i + K] - s[i]: -        max_s = s[i + K] - s[i] -print(((max_s + K) / 2)) +p = list(map(int, input().split())) +m = [(e + 1) / 2 for e in p] +t = sum(m[0:K]) +result = t +for i in range(N - K): +    t -= m[i] +    t += m[i + K] +    if t > result: +        result = t +print(result)