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

d = Array.new(20, 0)
d.each_with_index{ |i, j|
  if j == 0 then
    d[0] = 1
  else
    d[j] = d[j - 1] * 2
  end
}

result = 0
for saikoro in 1..N do
  for index in 0..d.length do
    if K < saikoro * d[index] then
      result += 1.0 / N.to_f * (1.0 / d[index].to_f)
      break
    end
  end
end

puts result