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