'use strict'

function Main(input) {
  input = input.split(' ');
  let N = parseInt(input [0]);
  let K = parseInt(input [1]);
  let result = 0;
  for(let i=1;i<N+1;i++){
    result += Math.pow(0.5, Math.max(Math.ceil(Math.log2(K/i)), 0));
    
  }
  result /= N
  console.log(result)
  
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));

