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

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

res=0
s=sum(p[:K])
for i in range(N-K+1):
    res=max(res,(s+K)/2)
    if i!=N-K:
        s=s+p[i+K]-p[i]
print(res)