n,k = map(int,input().split())
p = list(map(int,input().split()))
ps = [p[0]] + [0]*(n-1)
for i in range(1,n):
    ps[i] = ps[i-1] + p[i]
maxs = ps[k-1]
for i in range(1,n-k+1):
    maxs = max(maxs,ps[i+k-1]-ps[i-1])

print((maxs+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 ps = [p[0]] + [0]*(n-1) ps [p[0]] + [0]*(n-1) [p[0]] p[0] p 0 [0]*(n-1) [0] 0 n-1 n 1 for i in range(1,n):
    ps[i] = ps[i-1] + p[i] i range(1,n) range 1 n ps[i] = ps[i-1] + p[i] ps[i] ps i ps[i-1] + p[i] ps[i-1] ps i-1 i 1 p[i] p i maxs = ps[k-1] maxs ps[k-1] ps k-1 k 1 for i in range(1,n-k+1):
    maxs = max(maxs,ps[i+k-1]-ps[i-1]) i range(1,n-k+1) range 1 n-k+1 n-k n k 1 maxs = max(maxs,ps[i+k-1]-ps[i-1]) maxs max(maxs,ps[i+k-1]-ps[i-1]) max maxs ps[i+k-1]-ps[i-1] ps[i+k-1] ps i+k-1 i+k i k 1 ps[i-1] ps i-1 i 1 print((maxs+k)/2) print (maxs+k)/2 maxs+k maxs k 2 k = map(int,input().split()) map(int,input().split()) k ps = [p[0]] + [0]*(n-1) [p[0]] + [0]*(n-1) ps maxs = max(maxs,ps[i+k-1]-ps[i-1]) max(maxs,ps[i+k-1]-ps[i-1]) maxs maxs = ps[k-1] ps[k-1] maxs p = list(map(int,input().split())) list(map(int,input().split())) p n,k = map(int,input().split()) map(int,input().split()) n
n,k = map(int,input().split())
p = list(map(int,input().split()))
ps = [p[0]] + [0]*(n-1)
for i in range(1,n):
    ps[i] = ps[i-1] + p[i]
maxs = ps[k-1]
for i in range(1,n-k+1):
    maxs = max(maxs,ps[i+k-1]-ps[i-1])

print((maxs+k)/2)