import java.util.Scanner



object Main {
  def read() = {
    val sc = new Scanner(System.in)
    val n, k = sc.nextInt()
    (n, k)
  }

  def solve2(n: Int, k: Int): Double = {
    val tlist = (1 to n).map(i => {
      var t = 0
      var point = i
      while (point < k) {
        point = 2 * point
        t = t + 1
      }
      t
    })
    tlist.map(t => Math.pow(0.5, t)).sum/n
  }

  def main(args: Array[String]): Unit = {
    val (n, k) = read()
    println(solve2(n, k))
  }
}