N,K = map(int,input().split())
p = [int(x) for x in input().split()]

cnt = 0

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


print((ans+K)/2) N,K = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x p = [int(x) for x in input().split()] p [int(x) for x in input().split()] cnt = 0 cnt 0 for i in range(K):
    cnt += p[i] i range(K) range K cnt += p[i] cnt p[i] p i ans = cnt ans cnt for i in range(1,N-K+1):
    cnt -= p[i-1]
    cnt += p[K+i-1]
    ans = max(cnt,ans) i range(1,N-K+1) range 1 N-K+1 N-K N K 1 cnt -= p[i-1] cnt p[i-1] p i-1 i 1 cnt += p[K+i-1] cnt p[K+i-1] p K+i-1 K+i K i 1 ans = max(cnt,ans) ans max(cnt,ans) max cnt ans print((ans+K)/2) print (ans+K)/2 ans+K ans K 2 p = [int(x) for x in input().split()] [int(x) for x in input().split()] p ans = cnt cnt ans cnt += p[K+i-1] p[K+i-1] cnt N,K = map(int,input().split()) map(int,input().split()) N cnt -= p[i-1] p[i-1] cnt cnt += p[i] p[i] cnt K = map(int,input().split()) map(int,input().split()) K cnt = 0 0 cnt ans = max(cnt,ans) max(cnt,ans) ans
N,K = map(int,input().split())
p = [int(x) for x in input().split()]

cnt = 0

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


print((ans+K)/2)