program main
 implicit none
 
 integer*8 i
 real*8 N,K,P
 
 read(*,*) N,K
 P = 0.0D0
 do i=1,int(N)
  if(i >= K) then
   P = P + 1
  else
   P = P + 2 ** (-real(ceiling(log(K/real(i))/log(2.0D0))))
  end if
 end do
 write(*,*) P/N
end program main