num,renzoku=list(map(int,input().split()))

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

expects=[0]*num

Si=[0]*(num+1)

for i in range(1,num+1):

  Si[i]=Si[i-1]+(1+dices[i-1])/2

max_Si=0

for i in range(0,num-renzoku+1):

  if max_Si<Si[i+renzoku]-Si[i]:

    max_Si=Si[i+renzoku]-Si[i]

print(max_Si)

num,renzoku=list(map(int,input().split()))

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



sum_si=sum(dices[0:renzoku])

max_si=sum_si

for i in range(1,num-renzoku+1):

  sum_si=sum_si-dices[i-1]+dices[i+renzoku-1]

  if max_si<sum_si:

    max_si=sum_si

print(((renzoku+max_si)/2))
num, renzoku = list(map(int, input().split()))
dices = list(map(int, input().split()))
expects = [0] * num
Si = [0] * (num + 1)
for i in range(1, num + 1):
    Si[i] = Si[i - 1] + (1 + dices[i - 1]) / 2
max_Si = 0
for i in range(0, num - renzoku + 1):
    if max_Si < Si[i + renzoku] - Si[i]:
        max_Si = Si[i + renzoku] - Si[i]
print(max_Si)

num, renzoku = list(map(int, input().split()))
dices = list(map(int, input().split()))
sum_si = sum(dices[0:renzoku])
max_si = sum_si
for i in range(1, num - renzoku + 1):
    sum_si = sum_si - dices[i - 1] + dices[i + renzoku - 1]
    if max_si < sum_si:
        max_si = sum_si
print(((renzoku + max_si) / 2))

-expects = [0] * num -Si = [0] * (num + 1) -for i in range(1, num + 1): -    Si[i] = Si[i - 1] + (1 + dices[i - 1]) / 2 -max_Si = 0 -for i in range(0, num - renzoku + 1): -    if max_Si < Si[i + renzoku] - Si[i]: -        max_Si = Si[i + renzoku] - Si[i] -print(max_Si) +sum_si = sum(dices[0:renzoku]) +max_si = sum_si +for i in range(1, num - renzoku + 1): +    sum_si = sum_si - dices[i - 1] + dices[i + renzoku - 1] +    if max_si < sum_si: +        max_si = sum_si +print(((renzoku + max_si) / 2))