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

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


ssum = Rational(0)
sum.each do |ss|
  ssum += ss
end


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