#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;
int main(){
    double n,k,s=0,c=0.5;cin>>n>>k;
    for(int i=1;i<=n;i++){
    	int a=1,b=i;
    	while(b<k) a++,b*=2;
    	s=s+pow(c,a-1);
	}
	double dd=s/n;
	cout<<fixed<<setprecision(12)<<dd;
}