'use strict';
function main(input) {
  const args = input.split(' '),
        N = parseInt(args[0]),
        K = parseInt(args[1]);
  let P = 0;
  for (let i = 1; i <= N; ++i) {
    let cnt = 0;
    while (i * Math.pow(2, cnt) < K) {
      ++cnt;
    }
    P += 1/N * Math.pow(2, -cnt);
  }
  console.log(P);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));