from collections import deque

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

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



cnt=0

ans=0

buf=0

buf_2=0

q=deque([])

cnt=0

for i in range(N):

    cnt+=1

    buf=P[i]*(P[i]+1)//2/P[i]

    q.append(buf)

    buf_2+=buf

    if cnt>=K:

        if ans<buf_2:

            ans=buf_2

        buf_2-=q.popleft()

    # if len(q)==K:

    #     if sum(q)>ans:

    #         ans=sum(q)

    #     q.popleft()

print(ans)

from collections import deque



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

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



Ary=deque([])

ans,res,cnt=0,0,0

k=0



for i in range(N):

    cnt+=1

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

    Ary.append(k)

    res+=k

    if cnt<K:

        continue

    if ans<res:

        ans=res

    res-=Ary.popleft()



print(ans)
from collections import deque

N, K = list(map(int, input().split()))
P = list(map(int, input().split()))
cnt = 0
ans = 0
buf = 0
buf_2 = 0
q = deque([])
cnt = 0
for i in range(N):
    cnt += 1
    buf = P[i] * (P[i] + 1) // 2 / P[i]
    q.append(buf)
    buf_2 += buf
    if cnt >= K:
        if ans < buf_2:
            ans = buf_2
        buf_2 -= q.popleft()
    # if len(q)==K:
    #     if sum(q)>ans:
    #         ans=sum(q)
    #     q.popleft()
print(ans)

from collections import deque

N, K = list(map(int, input().split()))
P = list(map(int, input().split()))
Ary = deque([])
ans, res, cnt = 0, 0, 0
k = 0
for i in range(N):
    cnt += 1
    k = (P[i] + 1) / 2
    Ary.append(k)
    res += k
    if cnt < K:
        continue
    if ans < res:
        ans = res
    res -= Ary.popleft()
print(ans)

-cnt = 0 -ans = 0 -buf = 0 -buf_2 = 0 -q = deque([]) -cnt = 0 +Ary = deque([]) +ans, res, cnt = 0, 0, 0 +k = 0 -    buf = P[i] * (P[i] + 1) // 2 / P[i] -    q.append(buf) -    buf_2 += buf -    if cnt >= K: -        if ans < buf_2: -            ans = buf_2 -        buf_2 -= q.popleft() -    # if len(q)==K: -    #     if sum(q)>ans: -    #         ans=sum(q) -    #     q.popleft() +    k = (P[i] + 1) / 2 +    Ary.append(k) +    res += k +    if cnt < K: +        continue +    if ans < res: +        ans = res +    res -= Ary.popleft()