function Main(input) {
  "use strict";
	const lines = input.split("\n");
  let S = lines[0].split(" ").map(e => parseInt(e));
  
  const K = S.pop()
  const N = S.pop()

  const Ps = [];
  for (let i=0; i < 17; i++) {
    Ps.push(Math.pow(2, i+1))
  }

  const Pr = Ps.map( n => 1/n)
  const L = Ps.length;

  let ans = 0;
  for (let i=1; i<N+1; i++) {
    if (i >= K) {
      ans += 1/N;
      continue
    }
    let idx = 0;
    prb:
    for(let j =0; j < L ; j++) {
      if (i*Ps[j] >= K) {
        idx = j;
        break prb;
      }
    }
    ans += Pr[idx] / N


  }
  console.log(ans)

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