n,k=[int(i) for i in input().split()]
p=[int(i) for i in input().split()]

ex=[0]*1001
tmp=0
for i in range(1,1001):
  tmp+=i
  ex[i]=tmp/i

sumEx=[0]*(n+1)
for i in range(n):
  sumEx[i+1]=sumEx[i]+ex[p[i]]

maxA=0
for i in range(k,n+1):
  maxA=max(maxA,sumEx[i]-sumEx[i-k])
print(maxA) int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i n,k=[int(i) for i in input().split()] n [int(i) for i in input().split()] k int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i p=[int(i) for i in input().split()] p [int(i) for i in input().split()] ex=[0]*1001 ex [0]*1001 [0] 0 1001 tmp=0 tmp 0 for i in range(1,1001):
  tmp+=i
  ex[i]=tmp/i i range(1,1001) range 1 1001 tmp+=i tmp i ex[i]=tmp/i ex[i] ex i tmp/i tmp i sumEx=[0]*(n+1) sumEx [0]*(n+1) [0] 0 n+1 n 1 for i in range(n):
  sumEx[i+1]=sumEx[i]+ex[p[i]] i range(n) range n sumEx[i+1]=sumEx[i]+ex[p[i]] sumEx[i+1] sumEx i+1 i 1 sumEx[i]+ex[p[i]] sumEx[i] sumEx i ex[p[i]] ex p[i] p i maxA=0 maxA 0 for i in range(k,n+1):
  maxA=max(maxA,sumEx[i]-sumEx[i-k]) i range(k,n+1) range k n+1 n 1 maxA=max(maxA,sumEx[i]-sumEx[i-k]) maxA max(maxA,sumEx[i]-sumEx[i-k]) max maxA sumEx[i]-sumEx[i-k] sumEx[i] sumEx i sumEx[i-k] sumEx i-k i k print(maxA) print maxA sumEx=[0]*(n+1) [0]*(n+1) sumEx maxA=max(maxA,sumEx[i]-sumEx[i-k]) max(maxA,sumEx[i]-sumEx[i-k]) maxA maxA=0 0 maxA tmp+=i i tmp n,k=[int(i) for i in input().split()] [int(i) for i in input().split()] n p=[int(i) for i in input().split()] [int(i) for i in input().split()] p ex=[0]*1001 [0]*1001 ex k=[int(i) for i in input().split()] [int(i) for i in input().split()] k tmp=0 0 tmp
n,k=[int(i) for i in input().split()]
p=[int(i) for i in input().split()]

ex=[0]*1001
tmp=0
for i in range(1,1001):
  tmp+=i
  ex[i]=tmp/i

sumEx=[0]*(n+1)
for i in range(n):
  sumEx[i+1]=sumEx[i]+ex[p[i]]

maxA=0
for i in range(k,n+1):
  maxA=max(maxA,sumEx[i]-sumEx[i-k])
print(maxA)