function Main(input) {
    input = input.split("\n");
    var a = parseInt(input[0].split(" ")[0]);
    var b = parseInt(input[0].split(" ")[1]);
    var  po = 1;
    var  ans = 0;

    var k = 1 / a;
    for (var i = 0; i < a; i++) {
        po=0;
        while (true) {
            c = (i+1)*Math.pow(2, po);
            if (c >= b) {
                break;
            }
            po++;
        }
        ans += k*Math.pow((0.5), po);
    }
    console.log(ans);
  }
  Main(require("fs").readFileSync("/dev/stdin", "utf8"));