function main(input) {
        const line = input.split(' ');
        const n = line[0];
        const k = line[1];

        let result = 0;
        for (let i = 1; i <= n; ++i) {
                let j = i;
                let toss = 0;
                for (let j = i; j < k; j*=2, ++toss) ;

                result += Math.pow(0.5, toss) * (1 / n);
        }
        console.log(`${result}`);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));