#include <bits/stdc++.h>
using namespace std;

int main() {
  double N,K;
  double p=0.0;
  cin >> N >> K;

  for(double i=1.0;i<=N;i=i+1.0){
    double k=1.0;
    while(k<K/i){
      k=k*2;
    }
    double l=N*k;
    p=p+(1.0/l);
  }
  cout << std::setprecision(13) << p << endl;
}


