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