fun main(args: Array<String>) {
    val sc = java.util.Scanner(System.`in`)
    val n = sc.nextInt()
    val k = sc.nextInt()

    var r = 0.0
    for (i in 1..n) {
        // 分母
        var bb = n
        var sc = i
        while (sc < k) {
            sc *= 2
            bb *= 2
        }
        r += 1.0 / bb
    }
    println(r)
}