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

e = sum(range(1,p[0]+1))/p[0]
S = [e]

for i in range(1,N):
    ex = p[i]*(p[i]+1) / (2*p[i])
    S.append(ex + S[i-1])

ans = S[K-1]
for i in range(K,N):
    ans = max(ans,S[i]-S[i-K])

print(ans) 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 = sum(range(1,p[0]+1))/p[0] e sum(range(1,p[0]+1))/p[0] sum(range(1,p[0]+1)) sum range(1,p[0]+1) range 1 p[0]+1 p[0] p 0 1 p[0] p 0 S = [e] S [e] e for i in range(1,N):
    ex = p[i]*(p[i]+1) / (2*p[i])
    S.append(ex + S[i-1]) i range(1,N) range 1 N ex = p[i]*(p[i]+1) / (2*p[i]) ex p[i]*(p[i]+1) / (2*p[i]) p[i]*(p[i]+1) p[i] p i p[i]+1 p[i] p i 1 2*p[i] 2 p[i] p i S.append(ex + S[i-1]) S.append S append ex + S[i-1] ex S[i-1] S i-1 i 1 ans = S[K-1] ans S[K-1] S K-1 K 1 for i in range(K,N):
    ans = max(ans,S[i]-S[i-K]) i range(K,N) range K N ans = max(ans,S[i]-S[i-K]) ans max(ans,S[i]-S[i-K]) max ans S[i]-S[i-K] S[i] S i S[i-K] S i-K i K print(ans) print ans p = list(map(int,input().split())) list(map(int,input().split())) p ans = S[K-1] S[K-1] ans S = [e] [e] S e = sum(range(1,p[0]+1))/p[0] sum(range(1,p[0]+1))/p[0] e ans = max(ans,S[i]-S[i-K]) max(ans,S[i]-S[i-K]) ans ex = p[i]*(p[i]+1) / (2*p[i]) p[i]*(p[i]+1) / (2*p[i]) ex K = map(int,input().split()) map(int,input().split()) K N,K = map(int,input().split()) map(int,input().split()) N
N,K = map(int,input().split())
p = list(map(int,input().split()))

e = sum(range(1,p[0]+1))/p[0]
S = [e]

for i in range(1,N):
    ex = p[i]*(p[i]+1) / (2*p[i])
    S.append(ex + S[i-1])

ans = S[K-1]
for i in range(K,N):
    ans = max(ans,S[i]-S[i-K])

print(ans)
