"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const N = parseInt(arg[0].split(" ")[0]);
    const K = parseInt(arg[0].split(" ")[1]);
    
    let answer = [];
    
    for(let i=1; i<=N; i++) {
        let now = i;
        let cnt = 1;
        
        while(true) {
            if(now > K) break;
            now *= 2;
            cnt++;
            // console.log("now:" + now);
            // console.log("cnt:" + cnt);
        }
        
        // console.log(cnt - 1);
        
        let temp = (1 / N) * Math.pow(0.5, cnt - 1)
        
        answer.push(temp);
    }
    
    console.log(answer.reduce((m,n)=>m+n));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));