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

pro = 0.0
1.upto(n) do |i|
	if i >= k
		pro += 1.0 / n
		next
	end

	cnt = 1
	while i * 2 ** cnt < k
		cnt += 1
	end
	pro += (1.0 / n) * (1.0 / (2 ** cnt))
end

puts pro
