import scala.io.StdIn.readLine

object Main extends App {
  val Array(n, k) = readLine.split(" ").map(_.toInt)
  var ans = 0.0

  for (i <- 1 to n) {
    var initialScore = i
    var count = 0

    while (initialScore < k) {
      initialScore = initialScore * 2
      count += 1
    }

    ans += 1 / (math.pow(2, count) * n)
  }

  println(ans)
}
