import java.util.Scanner

object Main extends App  {
  val sc   = new Scanner(System.in)

  val n = sc.nextInt
  val k = sc.nextInt

  val res = (1 to n).foldLeft(0.0){ (sum, i) =>
    val cnt = log2_x(0, k, i)
    sum + 1 / Math.pow(2,cnt)
  } / n

  println(res)

  def log2_x(cnt: Long, bound: Long, tmp: Long): Long ={
    if(tmp >= bound) cnt
    else log2_x(cnt + 1, bound, tmp * 2)
  }
}
