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

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

cnt = 0

for i in range(K):

    cnt += P[i]

cmax = cnt

for i in range(K,N):

    cnt = cnt+P[i]-P[i-K]

    cmax = max(cmax,cnt)

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

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

A = [0 for _ in range(N)]

for i in range(N):

    A[i] = (P[i]+1)/2

cmax = sum(A[:K])

a = cmax

for i in range(1,N-K+1):

    a = a+A[i+K-1]-A[i-1]

    cmax = max(cmax,a)

print(cmax)
N, K = list(map(int, input().split()))
P = list(map(int, input().split()))
cnt = 0
for i in range(K):
    cnt += P[i]
cmax = cnt
for i in range(K, N):
    cnt = cnt + P[i] - P[i - K]
    cmax = max(cmax, cnt)
print(((K + cmax) / 2))

N, K = list(map(int, input().split()))
P = list(map(int, input().split()))
A = [0 for _ in range(N)]
for i in range(N):
    A[i] = (P[i] + 1) / 2
cmax = sum(A[:K])
a = cmax
for i in range(1, N - K + 1):
    a = a + A[i + K - 1] - A[i - 1]
    cmax = max(cmax, a)
print(cmax)

-cnt = 0 -for i in range(K): -    cnt += P[i] -cmax = cnt -for i in range(K, N): -    cnt = cnt + P[i] - P[i - K] -    cmax = max(cmax, cnt) -print(((K + cmax) / 2)) +A = [0 for _ in range(N)] +for i in range(N): +    A[i] = (P[i] + 1) / 2 +cmax = sum(A[:K]) +a = cmax +for i in range(1, N - K + 1): +    a = a + A[i + K - 1] - A[i - 1] +    cmax = max(cmax, a) +print(cmax)