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

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

maxim=[0]*(n-k+1)

cnt=0

s=0

for i in range(n):

    cnt+=1

    s+=p[i]

    if cnt==k:

        maxim[i-(k-1)]=s

        cnt=k-1

        s+=-p[i-(k-1)]



ans=(max(maxim)+k)/2

print(ans)

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

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



ranges = 0

temp = 0

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

    if ranges == 0:

        ranges = sum(p[:k])

        temp = ranges

    else:

        temp = temp - p[i - 1] + p[i - 1 + k]

        if temp > ranges:

            ranges = temp



ans = (ranges + k) / 2

print(ans)
n, k = list(map(int, input().split()))
p = list(map(int, input().split()))
maxim = [0] * (n - k + 1)
cnt = 0
s = 0
for i in range(n):
    cnt += 1
    s += p[i]
    if cnt == k:
        maxim[i - (k - 1)] = s
        cnt = k - 1
        s += -p[i - (k - 1)]
ans = (max(maxim) + k) / 2
print(ans)

n, k = list(map(int, input().split()))
p = list(map(int, input().split()))
ranges = 0
temp = 0
for i in range(n - k + 1):
    if ranges == 0:
        ranges = sum(p[:k])
        temp = ranges
    else:
        temp = temp - p[i - 1] + p[i - 1 + k]
        if temp > ranges:
            ranges = temp
ans = (ranges + k) / 2
print(ans)

-maxim = [0] * (n - k + 1) -cnt = 0 -s = 0 -for i in range(n): -    cnt += 1 -    s += p[i] -    if cnt == k: -        maxim[i - (k - 1)] = s -        cnt = k - 1 -        s += -p[i - (k - 1)] -ans = (max(maxim) + k) / 2 +ranges = 0 +temp = 0 +for i in range(n - k + 1): +    if ranges == 0: +        ranges = sum(p[:k]) +        temp = ranges +    else: +        temp = temp - p[i - 1] + p[i - 1 + k] +        if temp > ranges: +            ranges = temp +ans = (ranges + k) / 2