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);
	}
}
 import java.util.Scanner; Scanner java.util 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);
	}
} 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);
	} coin {
		int count = 0;

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

		return 1.0 / (double)Math.pow(2, count);
	} int count = 0; count 0 while(point < border){
			point *= 2;
			count++;
		} point < border point border {
			point *= 2;
			count++;
		} point *= 2 point 2 count++ count return 1.0 / (double)Math.pow(2, count); 1.0 / (double)Math.pow(2, count) 1.0 (double)Math.pow(2, count) Math.pow Math 2 count int point point int border border 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;
	} dice {
		double winRate= 0.0;

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

		return winRate;
	} double winRate= 0.0; winRate 0.0 for(int i = 1; i <= num; i++){
			winRate += 1.0 / (double)num * coin(i, border);
		} int i = 1; int i = 1; i 1 i <= num i num i++ i++ i {
			winRate += 1.0 / (double)num * coin(i, border);
		} {
			winRate += 1.0 / (double)num * coin(i, border);
		} winRate += 1.0 / (double)num * coin(i, border) winRate 1.0 / (double)num * coin(i, border) 1.0 / (double)num 1.0 (double)num coin(i, border) coin i border return winRate; winRate int num num int border border 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);
	} main {
		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);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int num = scan.nextInt(); num scan.nextInt() scan.nextInt scan int border = scan.nextInt(); border scan.nextInt() scan.nextInt scan double winRate = dice(num, border); winRate dice(num, border) dice num border System.out.println(winRate) System.out.println System.out System System.out winRate String[] args args 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);
	}
} 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);
	}
} Main
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);
	}
}

