
fun main(args:Array<String>){
    var (n,k) = readLine()!!.split(" ").map(String::toInt)
    var sum = 0.0
    for (x in 1 until (n+1)) {
        var tmp = 1.0/n
        var y = x
        while (y<k) {
            tmp *= 0.5
            y *= 2
        }
        sum+=tmp
    }

    println(sum)
}
