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