N, K = gets.split.map(&:to_i)

a = 1.0 / N
ans = (1..N).map do |n|
  if n >= K
    a
  else
    b = n
    c = 0
    while b < K
      c = c + 1
      b = b * 2
    end
    a * ((1.0 / 2) ** c)
  end
end.reduce(&:+)
puts ans
