input_nk = gets.chomp
n,k = input_nk.split.collect{ |item| item.to_i}
sump = Rational(0)

1.upto(n) do |start|
  if start < k
    coin =  Math.log(k.to_f/start.to_f,2).ceil
    sump += Rational(0.5 ** (coin))
  else
    sump += Rational(1)
  end
end

puts (sump/n).to_f