import java.util.Scanner;

public class Main {

	public static double coin(int point, int border){
		int count = 0;

		while(point < border){
			point *= 2;
			count++;
		}

		return 1.0 / (double)Math.pow(2, count);
	}

	public static double dice(int num, int border){
		double winRate= 0.0;

		for(int i = 1; i <= num; i++){
			winRate += 1.0 / (double)num * coin(i, border);
		}

		return winRate;
	}

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		// input
		int num = scan.nextInt();
		int border = scan.nextInt();

		// check
		double winRate = dice(num, border);

		// answer
		System.out.println(winRate);
	}
}


/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