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

#累積和を使う
e_s = [0] * (N+1)
for i in range(N):
    # 期待値の計算
    e = (p[i]+1)/2
    e_s[i+1] = e_s[i] + e

ans = 0
for j in range(N-K+1):
    ans = max(ans,e_s[j+K]-e_s[j])
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_s = [0] * (N+1) e_s [0] * (N+1) [0] 0 N+1 N 1 for i in range(N):
    # 期待値の計算
    e = (p[i]+1)/2
    e_s[i+1] = e_s[i] + e i range(N) range N e = (p[i]+1)/2 e (p[i]+1)/2 p[i]+1 p[i] p i 1 2 e_s[i+1] = e_s[i] + e e_s[i+1] e_s i+1 i 1 e_s[i] + e e_s[i] e_s i e ans = 0 ans 0 for j in range(N-K+1):
    ans = max(ans,e_s[j+K]-e_s[j]) j range(N-K+1) range N-K+1 N-K N K 1 ans = max(ans,e_s[j+K]-e_s[j]) ans max(ans,e_s[j+K]-e_s[j]) max ans e_s[j+K]-e_s[j] e_s[j+K] e_s j+K j K e_s[j] e_s j print(ans) print ans N,K = map(int,input().split()) map(int,input().split()) N ans = max(ans,e_s[j+K]-e_s[j]) max(ans,e_s[j+K]-e_s[j]) ans p = list(map(int,input().split())) list(map(int,input().split())) p ans = 0 0 ans e = (p[i]+1)/2 (p[i]+1)/2 e e_s = [0] * (N+1) [0] * (N+1) e_s K = map(int,input().split()) map(int,input().split()) K
N,K = map(int,input().split())
p = list(map(int,input().split()))

#累積和を使う
e_s = [0] * (N+1)
for i in range(N):
    # 期待値の計算
    e = (p[i]+1)/2
    e_s[i+1] = e_s[i] + e

ans = 0
for j in range(N-K+1):
    ans = max(ans,e_s[j+K]-e_s[j])
print(ans)
