object Main {
  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    val n = sc.nextInt()
    val k = sc.nextInt()
    var c = 0
    var x = 0
    var a:Double = (1.toDouble/n.toDouble)
    var r:Double = (1.toDouble/2.toDouble)
    val y = new Array[Double](n)

    for(i <- 1 to n) {
      x = i
      c = 0
      while(x < k) {
        x *= 2
        c += 1
      }
      y(i - 1) = a * Math.pow(r, c)
    }
    println(y.sum)
  }

}
