object Main {

  import Math.pow

  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    val N, K = sc.nextInt

    var result: Double = 0.0
    for (i <- 1 to N) {
      var point = i
      var count = 0
      while (point < K) {
        point *= 2
        count += 1
      }
      result += (1.0 / N) * (1 / pow(2.0, count))
    }

    println(result)
  }
}