object Main extends App {
  val in = scala.io.Source.stdin.getLines.toSeq
  val ls = in.head.split(' ').map(_.toInt)
  val N = ls(0)
  val K = ls(1)
  val ln2 = Math.log(2)
  private def func(i:Int):Int = {
    Math.max(0, Math.ceil(Math.log(K.toDouble / i) / ln2).toInt)
  }
  val sum = (1 to N).foldLeft(0.toDouble){ (a,i) =>
    val x = func(i)
    //println(x)
    a + Math.pow(0.5.toDouble, x)
  }
  println(sum / N)
}
