fun main(argc:Array<String>){
    val (N,K) = readLine()!!.split(" ").map(String::toInt)
    var Q : Double = 0.0
    var Cnt : Int
    var Point : Int
    for(i in 1..N){
        Cnt = 0
        Point = i
        while(Point < K){
            Point *= 2
            Cnt++
        }
        Q += (1.0/N) * pow(0.5F,Cnt) 
    }
    println(Q)
}

fun pow(x:Float,y: Int):Float{
    var Ans:Float = 1.0F
    for(i in 1..y){
        Ans *= x
    }
    return Ans
}