import scala.math._

  object Main {
    def main(args: Array[String]): Unit = {
      val lines = io.Source.stdin.getLines().toSeq
      println(solve(lines))
    }

    def solve(lines: Seq[String]): String = {
      val Array(n, k) = lines.head.split(" ").map(_.toInt)
      debug(n, k)

      val timesBuf = ArrayBuffer.empty[Int]
      for (i <- 1 to n) {
        var num = i
        var times = 0
        while (num < k) {
          num = num * 2
          times += 1
        }
        timesBuf.append(times)
      }

      val ansBuf = ArrayBuffer.empty[Double]
      timesBuf.foreach { times =>
        val a = if (times > 0) (1.0 / n.toDouble) * pow(1.0 / 2.0, times.toDouble) else 1.0 / n.toDouble
        ansBuf.append(a)
      }
      ansBuf.sum.toString
    }

    private def debug(x: Any): Unit = {
      if (System.getenv("LOCAL_DEBUG") != null) println(x)
    }
  }