n, k = gets.split(" ").map(&:to_i)

answer = 0

1.upto(n) do |number|
  omote_count = 0

  1.upto(100000) do |x|
    if number <= k - 1
      number = number * 2
      omote_count += 1
      next
    end

    break
  end

  answer += Rational(1, n) * (Rational(1, 2) ** omote_count)
end

puts answer.to_f
