
N, K = gets.chomp.split(' ').map { |aa| Rational(aa) }

sum = []
(1..N).each do |n|
  x = Rational(0)
  x += 1 while n * (2**x) <= K
  sum << (
    ((1 / Rational(2)) ** x
    )
  )
end

printf('%.10f', sum.sum / N)
