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