fun main(arr:Array<String>) {
    val (n,k) = readLine()!!.split(" ").map { it.toInt() }
    goal = k
    val results = (1..n).map { calc(it) }
    val max = results.maxBy { it.total}!!.total
    var win = 0L
    var total = 0L
    results.forEach {
        win += (it.win * (max/it.total))
        total += max
    }
    println("%.10f".format(win.toDouble()/total.toDouble()))
}

class Result(val win:Long, val total:Long)
var goal = 0

val dic = mutableMapOf<Int, Result>()
fun calc(num:Int):Result {
    if(num >= goal) {
        return Result(1, 1)
    }
    if(num <= 0) {
        return Result(0,1)
    }
    dic[num]?.let { return it }
    val ret = calc(num*2)
    val ans = Result(ret.win, ret.total * 2)
    dic[num] = ans
    return ans
}