n, k = gets.chomp.split(" ").map(&:to_i)

def coin_num(i, k)
  num = 0
  ii = i
  while ii < k
    ii *= 2
    num += 1
  end
  num
end

rate = 0.0
1.upto(n) do |i|
  rate += 1.0 / (n * (2.0 ** coin_num(i, k)))
end
puts rate
