function main(input){
  input = input.split(' ').map(Number);
  const N = input[0];
  const K = input[1];
  
  var maxNum = K -1;
  var result = [];
  
  for(i = 1;i <= N;i++){
    var pow = 0;
  	var now = i;
  	while(now <= K){
      now *= 2;
      pow++;
    }
    result.push(1/N * Math.pow(0.5, pow));
  }
  result = result.reduce((a,b)=>(a + b));
  console.log(result);
}
main(require('fs').readFileSync('/dev/stdin','utf8'));