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

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

e = (sum(p[0:K])+K) / 2
max_e = e
for i in range(1, N-K+1):
    e += -(p[i-1]+1)/2 + (p[i+K-1]+1)/2
    max_e = max(max_e, e)
    
print(max_e)