n,k = gets.chomp.split(" ").map(&:to_i)
p_sum = 0.0
n.times do |i|
  sum = i+1
  count = 0
  p = 1.0 / n.to_f
  while sum < k
    sum = sum * 2
    count += 1
    p = p / 2.0
  end
  p_sum += p
end
puts p_sum