N, K = gets.split.map(&:to_i)

ans = 0

N.times do |i|
  me = i + 1
  
  if me >= K
    

    ans += 1 

  else

    # p "yet!"
    # p me
    # p "がme"
    win = Math.log(K.to_f / me.to_f, 2).ceil
    
    # p win
    # p "がwin"
    #
    p_ = ( 1.to_f / (2 ** win) )
  
    ans += p_

  end


    #p ans if me < 10


end


puts (ans / N.to_f)



