require 'bigdecimal'

n, k = gets.strip.split.map(&:to_i)

ans = (1..n).map { |i|
  count = 0
  point = i
  while k > point
    point *= 2
    count += 1
  end
  BigDecimal(1) / BigDecimal(2 ** count)
}.sum / BigDecimal(n)

puts(ans.to_f)
