function main(input) {
    input = input[0].split(" ");
    n = parseInt(input[0],10);
    k = parseInt(input[1],10);
    var i, ans = 0;
    for(i=1; i<n+1; i++){
        ans += Math.pow(0.5, Math.max(Math.ceil(Math.log2(k/i)), 0));
    }
    ans /= n;
    console.log(ans);
}
main(require("fs").readFileSync("/dev/stdin", "utf8").split('\n'));