
fun main(args:Array<String>) {
    val (n,k) = readLine()!!.split(" ").map { it.toLong() }
    goal = k
    val resultList = (1..n).map { getAns(it) }
    val mul = resultList.maxBy { it.total() }!!.total()
    val winTotal = resultList.map { it.win * (mul/it.total()) }
    val total = mul*resultList.size
    println(winTotal.sum().toDouble()/total.toDouble())
}

val dic = mutableMapOf<Long, Result>()

fun getAns(current:Long):Result {
    if(current >= goal) {
        return Result(1, 0)
    }
    dic[current]?.let { return it}
    val ret = getAns(current * 2)
    val ans = Result(ret.win, ret.lose + ret.total())
    dic[current] = ans
    return ans
}
var goal = 0L
class Result(val win:Long, val lose:Long) {
    fun total():Long {
        return win + lose
    }
}