import scala.io.{StdIn => in}

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

  def f(ret:Double, num:Double):Double = {
    if(num >= k) ret
    else f(ret/2, num*2)
  }

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

  println(ans)
}