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