import scala.io.StdIn


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

   val lnOf2 = Math.log(2)
   def log2(x: Double): Double = scala.math.log(x) / lnOf2
   def times(n: Int) :Int = {
     0.max(Math.ceil(log2(k.toDouble / n)).toInt)
   }

   def solve(n: Int, k: Int): Double  = {
     (1 to n).foldLeft(0.toDouble) {(acc, v) =>
//       println(acc)
  
         acc + (Math.pow(0.5.toDouble , times(v)))
  
  
  
     }
   }
  println(solve(n, k) / n)  



}
  

