      PROGRAM DiceAndCoin
      IMPLICIT NONE
      integer(16) :: n,k
      integer(16) :: score,counter,i
      real(16) :: ans
      !simulation!
      read*,n,k
      
      ans = 0
      do i = 1,n
        score = i
        counter = 0
        do while( score<=k-1 )
          score = score * 2
          counter = counter + 1
        end do
        
        
        ans = ans + 1_16 / real(2**counter)
        
      end do
      
      ans = ans / real(n)
      
      print*,ans
      
      
      
      do while(.false.)
        print*,'piyo'
      end do
      
      END PROGRAM