"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 = 0;
    
    for(let i=1; i<=N; i++) {
        let temp;
        let x = 1 / N;
        
        if(i >= K) {
            answer += x * 1;
        } else {
            let j = 0;
            
            while(i * Math.pow(2, j) < K) {
                j++;
            }
            
            let y = Math.pow((1 / 2), j);
            answer += x * y;
        }
    }
    
    console.log(answer);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));