n, k = gets.split(" ").map(&:to_i)
probability = 0.0
(1..n).each do |index|
  point = index
  multiply_times = 0
  while point < k do
    point *= 2
    multiply_times += 1
  end
  puts multiply_times
  probability += 1.0 / n / (2 ** multiply_times)
  puts 1.0 / n / (2 ** multiply_times)
end
puts probability