function Main(input) {
	tmp = input.split(" ");
	var n = parseInt(tmp[0]);
	var k = parseInt(tmp[1]);
	var t = 0;
	var rt = 0.0;
	var r = 0.0;
	for (var i = 0 ; i < n ; i++){
		t = i+1;
		rt = 1 / n;
		while(t < k){
			rt = rt * 0.5;
			t = t * 2;
		}
		r += rt;
		rt = 0.0;
	}
	console.log(r);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));