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

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

from itertools import accumulate

acc=[0]

acc.extend(accumulate(P))

ans=0

for i in range(N-K+1):

  exp=(acc[K+i]-acc[i]+K)/2

  ans=max(exp,ans)

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

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

from itertools import accumulate

acc=[0]+list(accumulate(P))

print(((max(b-a for a,b in zip(acc,acc[K:]))+K)/2))
N, K = list(map(int, input().split()))
P = list(map(int, input().split()))
from itertools import accumulate

acc = [0]
acc.extend(accumulate(P))
ans = 0
for i in range(N - K + 1):
    exp = (acc[K + i] - acc[i] + K) / 2
    ans = max(exp, ans)
print(ans)

N, K = list(map(int, input().split()))
P = list(map(int, input().split()))
from itertools import accumulate

acc = [0] + list(accumulate(P))
print(((max(b - a for a, b in zip(acc, acc[K:])) + K) / 2))

-acc = [0] -acc.extend(accumulate(P)) -ans = 0 -for i in range(N - K + 1): -    exp = (acc[K + i] - acc[i] + K) / 2 -    ans = max(exp, ans) -print(ans) +acc = [0] + list(accumulate(P)) +print(((max(b - a for a, b in zip(acc, acc[K:])) + K) / 2))