'use strict';

function main(stdin) {
  const input = stdin.split(' ').map(v => parseInt(v, 10));
  const N = input[0];
  const K = input[1];

  const probs = [];

  for (let i = 0, p = 1; i < 20; ++i) {
    probs[i] = p;
    p /= 2;
  }

  let ans = 0;

  for (let n = 1; n <= N; ++n) {
    let i = 0;

    for (let k = n; k < K; k *= 2) {
      ++i
    }

    ans += probs[i];
  }

  ans = ans / N;
  
  console.log(ans);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));