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