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

    fun Int.getProbability(): Double {
        return Math.pow(
            0.5,
            Math.max(
                0.0,
                Math.ceil(
                    Math.log(K / this.toDouble())
                            / Math.log(2.0)
                )
            )
        )
    }
    print((1..N).map { it.getProbability() }.average())


}

