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

percentage = []

def forScore(score)
  for i in 0..N
    score = score * 2
    return i+1 if score >= K
  end
end

for i in 1...N
  percentage << (1.0 / N) * (1.0 / (2 ** forScore(i)))
end

answer = 0

percentage.each do |s|
  answer += s
end

puts answer