N, K = gets.split(' ').map(&:to_i)

def add(a, b)
  a1, a2 = a
  b1, b2 = b

  c = a2.lcm(b2)
  [a1*c/a2 + b1*c/b2, c]
end

a,b = 1.upto(N).map {|i|
  try = Math.log2(1.0 * K / i).ceil
  try > 0 ? [1, 2**try] : [1,1]
}.inject([0,1]) {|acc,i| add(acc,i) }
puts 1.0 * a / b / N
