import numpy as np



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

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



tmp = np.sum(p[:K])

max = tmp

for i in range(N-K):

    tmp = tmp-p[i]+p[i+K]

    if tmp>max:

        max = tmp



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

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



tmp = sum(p[:K])

max = tmp

for i in range(N-K):

    tmp = tmp-p[i]+p[i+K]

    if tmp>max:

        max = tmp



print(((max+K)/2))
import numpy as np

N, K = list(map(int, input().split()))
p = np.array(list(map(int, input().split())))
tmp = np.sum(p[:K])
max = tmp
for i in range(N - K):
    tmp = tmp - p[i] + p[i + K]
    if tmp > max:
        max = tmp
print(((max + K) / 2))

N, K = list(map(int, input().split()))
p = list(map(int, input().split()))
tmp = sum(p[:K])
max = tmp
for i in range(N - K):
    tmp = tmp - p[i] + p[i + K]
    if tmp > max:
        max = tmp
print(((max + K) / 2))

-import numpy as np - -p = np.array(list(map(int, input().split()))) -tmp = np.sum(p[:K]) +p = list(map(int, input().split())) +tmp = sum(p[:K])