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

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

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

sm = sum(P[:K])  # 先頭のK個の和を計算

ans = sm  #  最大値（答え）を保存する

for i in range(N-K):

    sm = sm - P[i] + P[K+i]  # 窓をずらす

    ans = max(ans, sm)  # 最大値（答え）を更新

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

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

P = [p+1 for p in P]

sm = sum(P[:K])  # 先頭のK個の和を計算

ans = sm  #  最大値（答え）を保存する

for i in range(N-K):

    sm = sm - P[i] + P[K+i]  # 窓をずらす

    ans = max(ans, sm)  # 最大値（答え）を更新

print((ans/2))

N, K = list(map(int, input().split()))
P = list(map(int, input().split()))
P = [(p + 1) / 2 for p in P]
sm = sum(P[:K])  # 先頭のK個の和を計算
ans = sm  #  最大値（答え）を保存する
for i in range(N - K):
    sm = sm - P[i] + P[K + i]  # 窓をずらす
    ans = max(ans, sm)  # 最大値（答え）を更新
print(ans)

N, K = list(map(int, input().split()))
P = list(map(int, input().split()))
P = [p + 1 for p in P]
sm = sum(P[:K])  # 先頭のK個の和を計算
ans = sm  #  最大値（答え）を保存する
for i in range(N - K):
    sm = sm - P[i] + P[K + i]  # 窓をずらす
    ans = max(ans, sm)  # 最大値（答え）を更新
print((ans / 2))

-P = [(p + 1) / 2 for p in P] +P = [p + 1 for p in P] -print(ans) +print((ans / 2))