import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) {
		try {
			String[] input = new BufferedReader(new InputStreamReader(System.in)).readLine().split(" ");
			int faces = Integer.parseInt(input[0]);
			int target = Integer.parseInt(input[1]);
			double rate = 0;
			for (int i = 1; i <= faces; i++) {
				int cnt = 0;
				int sum = i;
				while(sum < target) {
					sum += sum;
					cnt++;
				}
				rate += Math.pow(0.5, cnt) / faces;
			}
			System.out.println(String.format("%.10f", rate));
		} catch (IOException e1) {
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args) {
		try {
			String[] input = new BufferedReader(new InputStreamReader(System.in)).readLine().split(" ");
			int faces = Integer.parseInt(input[0]);
			int target = Integer.parseInt(input[1]);
			double rate = 0;
			for (int i = 1; i <= faces; i++) {
				int cnt = 0;
				int sum = i;
				while(sum < target) {
					sum += sum;
					cnt++;
				}
				rate += Math.pow(0.5, cnt) / faces;
			}
			System.out.println(String.format("%.10f", rate));
		} catch (IOException e1) {
		}
	}
} Main public static void main(String[] args) {
		try {
			String[] input = new BufferedReader(new InputStreamReader(System.in)).readLine().split(" ");
			int faces = Integer.parseInt(input[0]);
			int target = Integer.parseInt(input[1]);
			double rate = 0;
			for (int i = 1; i <= faces; i++) {
				int cnt = 0;
				int sum = i;
				while(sum < target) {
					sum += sum;
					cnt++;
				}
				rate += Math.pow(0.5, cnt) / faces;
			}
			System.out.println(String.format("%.10f", rate));
		} catch (IOException e1) {
		}
	} main {
		try {
			String[] input = new BufferedReader(new InputStreamReader(System.in)).readLine().split(" ");
			int faces = Integer.parseInt(input[0]);
			int target = Integer.parseInt(input[1]);
			double rate = 0;
			for (int i = 1; i <= faces; i++) {
				int cnt = 0;
				int sum = i;
				while(sum < target) {
					sum += sum;
					cnt++;
				}
				rate += Math.pow(0.5, cnt) / faces;
			}
			System.out.println(String.format("%.10f", rate));
		} catch (IOException e1) {
		}
	} try {
			String[] input = new BufferedReader(new InputStreamReader(System.in)).readLine().split(" ");
			int faces = Integer.parseInt(input[0]);
			int target = Integer.parseInt(input[1]);
			double rate = 0;
			for (int i = 1; i <= faces; i++) {
				int cnt = 0;
				int sum = i;
				while(sum < target) {
					sum += sum;
					cnt++;
				}
				rate += Math.pow(0.5, cnt) / faces;
			}
			System.out.println(String.format("%.10f", rate));
		} catch (IOException e1) {
		} catch (IOException e1) {
		} IOException e1 {
		} {
			String[] input = new BufferedReader(new InputStreamReader(System.in)).readLine().split(" ");
			int faces = Integer.parseInt(input[0]);
			int target = Integer.parseInt(input[1]);
			double rate = 0;
			for (int i = 1; i <= faces; i++) {
				int cnt = 0;
				int sum = i;
				while(sum < target) {
					sum += sum;
					cnt++;
				}
				rate += Math.pow(0.5, cnt) / faces;
			}
			System.out.println(String.format("%.10f", rate));
		} String[] input = new BufferedReader(new InputStreamReader(System.in)).readLine().split(" "); input new BufferedReader(new InputStreamReader(System.in)).readLine().split(" ") new BufferedReader(new InputStreamReader(System.in)).readLine().split new BufferedReader(new InputStreamReader(System.in)).readLine() new BufferedReader(new InputStreamReader(System.in)).readLine new BufferedReader(new InputStreamReader(System.in)) " " int faces = Integer.parseInt(input[0]); faces Integer.parseInt(input[0]) Integer.parseInt Integer input[0] input 0 int target = Integer.parseInt(input[1]); target Integer.parseInt(input[1]) Integer.parseInt Integer input[1] input 1 double rate = 0; rate 0 for (int i = 1; i <= faces; i++) {
				int cnt = 0;
				int sum = i;
				while(sum < target) {
					sum += sum;
					cnt++;
				}
				rate += Math.pow(0.5, cnt) / faces;
			} int i = 1; int i = 1; i 1 i <= faces i faces i++ i++ i {
				int cnt = 0;
				int sum = i;
				while(sum < target) {
					sum += sum;
					cnt++;
				}
				rate += Math.pow(0.5, cnt) / faces;
			} {
				int cnt = 0;
				int sum = i;
				while(sum < target) {
					sum += sum;
					cnt++;
				}
				rate += Math.pow(0.5, cnt) / faces;
			} int cnt = 0; cnt 0 int sum = i; sum i while(sum < target) {
					sum += sum;
					cnt++;
				} sum < target sum target {
					sum += sum;
					cnt++;
				} sum += sum sum sum cnt++ cnt rate += Math.pow(0.5, cnt) / faces rate Math.pow(0.5, cnt) / faces Math.pow(0.5, cnt) Math.pow Math 0.5 cnt faces System.out.println(String.format("%.10f", rate)) System.out.println System.out System System.out String.format("%.10f", rate) String.format String "%.10f" rate String[] args args public class Main {
	public static void main(String[] args) {
		try {
			String[] input = new BufferedReader(new InputStreamReader(System.in)).readLine().split(" ");
			int faces = Integer.parseInt(input[0]);
			int target = Integer.parseInt(input[1]);
			double rate = 0;
			for (int i = 1; i <= faces; i++) {
				int cnt = 0;
				int sum = i;
				while(sum < target) {
					sum += sum;
					cnt++;
				}
				rate += Math.pow(0.5, cnt) / faces;
			}
			System.out.println(String.format("%.10f", rate));
		} catch (IOException e1) {
		}
	}
} public class Main {
	public static void main(String[] args) {
		try {
			String[] input = new BufferedReader(new InputStreamReader(System.in)).readLine().split(" ");
			int faces = Integer.parseInt(input[0]);
			int target = Integer.parseInt(input[1]);
			double rate = 0;
			for (int i = 1; i <= faces; i++) {
				int cnt = 0;
				int sum = i;
				while(sum < target) {
					sum += sum;
					cnt++;
				}
				rate += Math.pow(0.5, cnt) / faces;
			}
			System.out.println(String.format("%.10f", rate));
		} catch (IOException e1) {
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) {
		try {
			String[] input = new BufferedReader(new InputStreamReader(System.in)).readLine().split(" ");
			int faces = Integer.parseInt(input[0]);
			int target = Integer.parseInt(input[1]);
			double rate = 0;
			for (int i = 1; i <= faces; i++) {
				int cnt = 0;
				int sum = i;
				while(sum < target) {
					sum += sum;
					cnt++;
				}
				rate += Math.pow(0.5, cnt) / faces;
			}
			System.out.println(String.format("%.10f", rate));
		} catch (IOException e1) {
		}
	}
}
