def dual_gt(x, max)
  n=0
  while(x < max) do
  	n += 1
  	x *= 2
  end
  return n
end
 
n,k = gets.split.map(&:to_f)
result = 0.0
xs = (1..n).each do |i|
	result += (1.to_f/n.to_f) * ((1.to_f/2.to_f) ** dual_gt(i.to_f, k.to_f).to_f)
end
puts result