n, k = list(map(int, input().split()))

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



e = []

for v in p:

    if v % 2 == 0:

        e.append(((v+1)*(v//2)) / v)

    else:

        e.append(((v+1)*(v//2) + (v+1) // 2) / v)



e_sum = [0]



for i in range(len(e)):

    e_sum.append(e_sum[i] + e[i])



ans = 0



for i in range(k, len(e_sum)):

    ans = max(ans, e_sum[i] - e_sum[i-k])



print(ans)

n, k = list(map(int, input().split()))

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

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



# 累積和

def cumsum(a):

    r = [0]

    for v in a:

        r.append(r[-1] + v)

    return r



cs = cumsum(p)



ans = 0

for i in range(k, n+1):

    ans = max(ans, cs[i] - cs[i-k])



print(ans)
n, k = list(map(int, input().split()))
p = list(map(int, input().split()))
e = []
for v in p:
    if v % 2 == 0:
        e.append(((v + 1) * (v // 2)) / v)
    else:
        e.append(((v + 1) * (v // 2) + (v + 1) // 2) / v)
e_sum = [0]
for i in range(len(e)):
    e_sum.append(e_sum[i] + e[i])
ans = 0
for i in range(k, len(e_sum)):
    ans = max(ans, e_sum[i] - e_sum[i - k])
print(ans)

n, k = list(map(int, input().split()))
p = list(map(int, input().split()))
p = [(x + 1) / 2 for x in p]
# 累積和
def cumsum(a):
    r = [0]
    for v in a:
        r.append(r[-1] + v)
    return r


cs = cumsum(p)
ans = 0
for i in range(k, n + 1):
    ans = max(ans, cs[i] - cs[i - k])
print(ans)

-e = [] -for v in p: -    if v % 2 == 0: -        e.append(((v + 1) * (v // 2)) / v) -    else: -        e.append(((v + 1) * (v // 2) + (v + 1) // 2) / v) -e_sum = [0] -for i in range(len(e)): -    e_sum.append(e_sum[i] + e[i]) +p = [(x + 1) / 2 for x in p] +# 累積和 +def cumsum(a): +    r = [0] +    for v in a: +        r.append(r[-1] + v) +    return r + + +cs = cumsum(p) -for i in range(k, len(e_sum)): -    ans = max(ans, e_sum[i] - e_sum[i - k]) +for i in range(k, n + 1): +    ans = max(ans, cs[i] - cs[i - k])