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