function main(input) {
  let inputs=input.split(' ');
  let n=Number(inputs[0]),k=Number(inputs[1]);
  let rate=0;
  for(let i=1; i<=n; i++){
    let rate2=1,n2=i;
    while(n2<k){
      rate2/=2;
      n2*=2;
    }
    rate+=rate2;
  }
  console.log(rate/n);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));