n,k=map(int,input().split())
a=list(map(int,input().split()))

rui=[0]
for i in a:
  rui.append(rui[-1]+i)
hantei=0
for i in range(0,len(rui)-k):
  if hantei<=rui[i+k]-rui[i]:
    hantei=rui[i+k]-rui[i]
    l=i
    r=i+k
ans=0
for i in range(l,r):
  ans+=(a[i]+1)/2
  
print(ans) n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k a=list(map(int,input().split())) a list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split rui=[0] rui [0] 0 for i in a:
  rui.append(rui[-1]+i) i a rui.append(rui[-1]+i) rui.append rui append rui[-1]+i rui[-1] rui -1 i hantei=0 hantei 0 for i in range(0,len(rui)-k):
  if hantei<=rui[i+k]-rui[i]:
    hantei=rui[i+k]-rui[i]
    l=i
    r=i+k i range(0,len(rui)-k) range 0 len(rui)-k len(rui) len rui k if hantei<=rui[i+k]-rui[i]:
    hantei=rui[i+k]-rui[i]
    l=i
    r=i+k hantei<=rui[i+k]-rui[i] hantei rui[i+k]-rui[i] rui[i+k] rui i+k i k rui[i] rui i hantei=rui[i+k]-rui[i] hantei rui[i+k]-rui[i] rui[i+k] rui i+k i k rui[i] rui i l=i l i r=i+k r i+k i k ans=0 ans 0 for i in range(l,r):
  ans+=(a[i]+1)/2
   i range(l,r) range l r ans+=(a[i]+1)/2 ans (a[i]+1)/2 a[i]+1 a[i] a i 1 2 print(ans) print ans ans+=(a[i]+1)/2 (a[i]+1)/2 ans ans=0 0 ans n,k=map(int,input().split()) map(int,input().split()) n rui=[0] [0] rui hantei=rui[i+k]-rui[i] rui[i+k]-rui[i] hantei l=i i l a=list(map(int,input().split())) list(map(int,input().split())) a hantei=0 0 hantei k=map(int,input().split()) map(int,input().split()) k r=i+k i+k r
n,k=map(int,input().split())
a=list(map(int,input().split()))

rui=[0]
for i in a:
  rui.append(rui[-1]+i)
hantei=0
for i in range(0,len(rui)-k):
  if hantei<=rui[i+k]-rui[i]:
    hantei=rui[i+k]-rui[i]
    l=i
    r=i+k
ans=0
for i in range(l,r):
  ans+=(a[i]+1)/2
  
print(ans)