import java.util.*

fun main(args:Array<String>){
    val (n,k) = readLine()!!.split(" ").map{it.toInt()}
    var ans : Double = 0.0
    for(i in 1 .. n){
        var t = 1.toDouble() / n
        var j = i
        while(j < k){
            t /= 2
            j *= 2
        }
        ans += t
    }
    println("%.20f".format(ans))
}
