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