import scala.io.{StdIn => in}

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

  def f(cnt:Int, num:Int):Int = {
    if(num >= k) cnt
    else f(cnt+1, num*2)
  }

  val dn = n.toDouble
  val ans = if (k == 1) 1
    else (1 to n)./:(0d)((acc, i) => {
        val cnt = f(0, i)
        acc + 1 / dn * math.pow(0.5,cnt)
      })

  println(ans)
}