fun main(args: Array<String>) {
    val (n, k) = readLine()?.split(" ")?.map(String::toDouble) ?: return
    var r = 0.0
    1.until(n.toInt() + 1).forEach {
        var dc = 1 / n
        var kk = it
        while (kk < k) {
            kk *= 2
            dc /= 2
        }
        r += dc
    }
    println(r)
}