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