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

ans = 0.0

(1..N).each do |n|
  if n == 1
   e = Math.log(K, 2).floor + 1
  else
   e = Math.log(K, n).floor
  end
  ans = ans + (1.0 / N) * ((1.0 / 2.0) ** e)
end

puts ans