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

if N > K
  range = [*(1..K - 1)]
  rest = [*(K..N)]
else 
  range = [*(1..N)]
  rest = nil
end

answer = range.map{|number1| [*(1..10**5)].bsearch{|number2| 2**number2 > (K / number1).to_i}}

probability = answer.map{|a_e| 1/N.to_f * 1/2.to_f**a_e.to_f}

if rest == nil
  puts probability.sum
else
  puts probability.sum + 1/N.to_f * rest.count.to_f
end 