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

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

expects=[0]*num

for i in range(num):

  pi=dices[i]

  expects[i]=(1+pi)/2

Si=[0]*(num+1)

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

  Si[i]=Si[i-1]+expects[i-1]

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()))

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()))
expects = [0] * num
for i in range(num):
    pi = dices[i]
    expects[i] = (1 + pi) / 2
Si = [0] * (num + 1)
for i in range(1, num + 1):
    Si[i] = Si[i - 1] + expects[i - 1]
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()))
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)

-for i in range(num): -    pi = dices[i] -    expects[i] = (1 + pi) / 2 -    Si[i] = Si[i - 1] + expects[i - 1] +    Si[i] = Si[i - 1] + (1 + dices[i - 1]) / 2