import java.util.*
import java.math.*
fun main(args: Array<String>) {

    var (N, K) = readLine()!!.split(" ").map { it.toInt() }
//    var N = readLine()!!.toInt()
//    val D = readLine()!!.split(" ").map { it.toLong() }
//    val A = readLine()!!.split(" ").map { it.toInt() }.toIntArray()

    val mod = 1000000007L
    val coin = IntArray(N){1}

    for (n in 1..N) {
        var k = n
        while (k < K) {
            k *= 2
            coin[n-1] *= 2
        }
    }

    var ans = 0.00000000000
    for (c in coin) {
        ans += 1.0/c.toDouble()
    }
    ans /= N.toDouble()
    println("%.9f".format(ans))
}
