fun main(args:Array<String>) {
    val (n,k) = readLine()!!.split(" ").map { it.toInt() }
    var div = 1
    var po = 0
    for(i in 1..n) {
        if(i >= k) {
            po += div
            continue
        }
        var mul = 0
        var tmp = i
        for(j in 1..k) {
            if(tmp >= k) {
                break
            }
            mul++
            tmp *= 2
        }
        var newDiv = Math.pow(2.toDouble(), mul.toDouble()).toInt()
        if(newDiv < div) {
            po += (div/newDiv)
        } else {
            po+=div
            div = newDiv * div
        }
    }
    print(po.toDouble()/(div*n))
}
