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

sum = 0
1.upto(n) do |i|
  if i >= k
    sum += 1
  else
    j = 0
    tmp = i
    while tmp < k do
      tmp *= 2
      j += 1
    end
    p j
    sum += 1.0/(2**j)
    p sum
  end
end

puts sum/n.to_f
