fun main(args : Array<String>) {
    val (N, K) = readLine()!!.split(" ").map { it.toInt() }

    val probability = (1..N).map { i ->
        var ans = 0.0
        if (i >= K) {
            ans = 1.0 / N.toDouble()
        } else {
            val x = Math.ceil(log2((K.toDouble() / i.toDouble())))
            ans = 1 / (Math.pow(2.toDouble(), x) * N.toDouble())
        }
        ans
    }.sum()

    println(probability)
}

fun log2(value: Double) : Double {
    return Math.log(value)/Math.log(2.0)

}