import scala.io.StdIn._

object Main extends App {

  val Array(n,k) = readLine().split(" ").map(_.toInt)

  def solve() = {
    (1 to n).foldLeft(0D) { (acc, i) =>
      acc + calcProbability(i)
    }
  }

  def calcProbability(i: Int): Double = {
    var score = i
    var cnt = 0
    while(score < k) {
      score *= 2
      cnt += 1
    }
    Math.pow(1.toDouble/2, cnt) * 1.toDouble / n
  }

  println(solve())

}

