import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// 入力受け取り
		Scanner in = new Scanner(System.in);
		double N = in.nextDouble();
		double K = in.nextDouble();

		double y = 1;
		double sum = 0;

		// サイコロの目：１～Nで場合分け
		for ( int die = 1; die <= N; die++, y = 1.0 ) {

			// K以上になるまでコインを振る
			while ( die * y < K ) {
				y *= 2;
			}
			// 表が出続ける確率*サイコロのその目が出る確率
			sum += (1 / y) * (1 / N);
		}
		
		System.out.println(sum);
		in.close();
	}
}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz