process.stdin.resume();
process.stdin.setEncoding('utf8'); 
var lines = [];
var reader = require('readline').createInterface({
	input: process.stdin,
	output: process.stdout
});
 
reader.on('line', (line) => {
	lines.push(line);
});

reader.on('close', () => {
	"use strict"
	const N = +lines[0].split(" ")[0];
	const K = +lines[0].split(" ")[1];
	
	const ans = Array.from(Array(N),(e, i) => 
			Math.ceil(Math.max(Math.log2(K/(i+1)),0)))
		.map(n => Math.pow(1/2,n) / N)
		.reduce((a,b) => a+b);
	
	console.log(ans);
});