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

for i in range(n):
  l[i]=(l[i]+1)/2

lis=[0]*(n+1)
for i in range(n):
  lis[i+1]=lis[i]+l[i]
  
ans=0
for i in range(n-k+1):
  num=lis[i+k]-lis[i]
  ans=max(num,ans)
  
print(ans) n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k l=list(map(int,input().split())) l list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split for i in range(n):
  l[i]=(l[i]+1)/2 i range(n) range n l[i]=(l[i]+1)/2 l[i] l i (l[i]+1)/2 l[i]+1 l[i] l i 1 2 lis=[0]*(n+1) lis [0]*(n+1) [0] 0 n+1 n 1 for i in range(n):
  lis[i+1]=lis[i]+l[i]
   i range(n) range n lis[i+1]=lis[i]+l[i] lis[i+1] lis i+1 i 1 lis[i]+l[i] lis[i] lis i l[i] l i ans=0 ans 0 for i in range(n-k+1):
  num=lis[i+k]-lis[i]
  ans=max(num,ans)
   i range(n-k+1) range n-k+1 n-k n k 1 num=lis[i+k]-lis[i] num lis[i+k]-lis[i] lis[i+k] lis i+k i k lis[i] lis i ans=max(num,ans) ans max(num,ans) max num ans print(ans) print ans n,k=map(int,input().split()) map(int,input().split()) n lis=[0]*(n+1) [0]*(n+1) lis l=list(map(int,input().split())) list(map(int,input().split())) l num=lis[i+k]-lis[i] lis[i+k]-lis[i] num ans=0 0 ans k=map(int,input().split()) map(int,input().split()) k ans=max(num,ans) max(num,ans) ans
n,k=map(int,input().split())
l=list(map(int,input().split()))

for i in range(n):
  l[i]=(l[i]+1)/2

lis=[0]*(n+1)
for i in range(n):
  lis[i+1]=lis[i]+l[i]
  
ans=0
for i in range(n-k+1):
  num=lis[i+k]-lis[i]
  ans=max(num,ans)
  
print(ans)