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

bb = 2**Math.log2(k).ceil

s = 0
b = n * bb

1.upto(n) do |i|
  if i >= k
    s += b / n
  else
    if i == 1
      s += 1
    else
      s += bb / (2**(Math.log(k, i).ceil - 1))
    end
  end
end

puts s.to_f / b.to_f
