fun main(args: Array<String>) {
    val (n, k) = readLine()!!.split(" ").map{it.toInt()}
    var res = 0.0
    for (i in 1..n) {
        var den = n
        var num = i
        while (num < k) {
            den *= 2
            num *= 2
        }
        res += 1.0/den
    }

    println(res)
}