#include <iostream>
#include <cstdio>
using namespace std;

int n, k;
double sum;
int main() {
	int i, j, c;
	cin>>n>>k;
	for(i=1; i<=n; i++) {
		for(j=i, c=1; j<k; j*=2, c*=2);
		sum += 1./c;
	}
	printf("%.10f", sum / n);
	return 0;
}