N, K = map(int, input().split())
p = list(map(int, input().split()))
E = [0] * N
for i in range(N):
    P = 0.5 * p[i] * (p[i] + 1)
    E[i] = P / p[i]
S = sum(E[:K])
s = S
for i in range(N - K):
    s -= E[i]
    s += E[i + K]
    S = max(S, s)
print(S) N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K p = list(map(int, input().split())) p list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split E = [0] * N E [0] * N [0] 0 N for i in range(N):
    P = 0.5 * p[i] * (p[i] + 1)
    E[i] = P / p[i] i range(N) range N P = 0.5 * p[i] * (p[i] + 1) P 0.5 * p[i] * (p[i] + 1) 0.5 * p[i] 0.5 p[i] p i p[i] + 1 p[i] p i 1 E[i] = P / p[i] E[i] E i P / p[i] P p[i] p i S = sum(E[:K]) S sum(E[:K]) sum E[:K] E :K K s = S s S for i in range(N - K):
    s -= E[i]
    s += E[i + K]
    S = max(S, s) i range(N - K) range N - K N K s -= E[i] s E[i] E i s += E[i + K] s E[i + K] E i + K i K S = max(S, s) S max(S, s) max S s print(S) print S K = map(int, input().split()) map(int, input().split()) K p = list(map(int, input().split())) list(map(int, input().split())) p s = S S s P = 0.5 * p[i] * (p[i] + 1) 0.5 * p[i] * (p[i] + 1) P s -= E[i] E[i] s s += E[i + K] E[i + K] s N, K = map(int, input().split()) map(int, input().split()) N E = [0] * N [0] * N E S = sum(E[:K]) sum(E[:K]) S S = max(S, s) max(S, s) S
N, K = map(int, input().split())
p = list(map(int, input().split()))
E = [0] * N
for i in range(N):
    P = 0.5 * p[i] * (p[i] + 1)
    E[i] = P / p[i]
S = sum(E[:K])
s = S
for i in range(N - K):
    s -= E[i]
    s += E[i + K]
    S = max(S, s)
print(S)