inputs = STDIN.gets.chomp.split(' ').map(&:to_i)

N = inputs[0]
K = inputs[1]

COIN_PROBABILITY = 0.5

answer = 0

(1..N).each do |i|
  if i >= K
    answer += 1.0/N
    next
  end
  base_probability = 1.0/N
  target = K / i
  time = 0
  while true do
    break if target < (2**time)
    time += 1
    #puts "#{time}: #{2**time}, #{i}, #{target}"
  end
  answer += base_probability * (COIN_PROBABILITY**time)
end

puts answer 