"use strict";
function main(input) {
  const args = input.split(" ");

  const N = parseInt(args[0]);
  const K = parseInt(args[1]);

  let point = 0;
  let point_count = 1;
  let ans = 0;

  for (let i = 1; i <= N; i++) {
    point = i;
    while (point <= K) {
      point_count *= 0.5;
      point *= 2;
    }
    ans += (1 / N) * (point_count) * 2;
    point_count = 0.5;
  }

  console.log(ans);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
