"use strict";
const stringToIntDecimal = s => parseInt(s);

const readData = input => {
  const numberArray = input.split(" ").map(stringToIntDecimal);

  return {
    n: numberArray[0],
    k: numberArray[1]
  };
};

const calcRequiredChallengeCount = (point, k) => {
  let count = 0;

  while (point < k) {
    point <<= 1;
    count += 1;
  }

  return count;
};

const calcProbability = data => {
  let probability = 0;
  const n = data.n;
  const k = data.k;

  for (let i = 1; i <= n; i += 1) {
    const challengeCount = calcRequiredChallengeCount(i, k);
    probability += 1 / Math.pow(2, challengeCount);
  }

  return probability / n;
};

function Main(input) {
  let data = readData(input);
  console.log(calcProbability(data));
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));