def get_x(k, i, x)
  if i >= k then
    x
  else
    get_x(k, i * 2, x + 1)
  end
end

n, k = gets.strip.split(' ').map(&:to_i)
ans = 0

(1..n).each do |i|
#  if i >= k then
#    x = 0
#  else
#    x = Math.log(k / i, 2).ceil
#  end
  x = get_x(k, i, 0)
  ans += (0.5 ** x) / n
end

puts ans
