import java.math.BigDecimal;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();
			int K = sc.nextInt();

			BigDecimal p = new BigDecimal("0");
			for (int i = 1; i <= N; i++) {
				int point = i;
				BigDecimal p_sub = new BigDecimal("1");
				p_sub = p_sub.divide(BigDecimal.valueOf(N), 15, BigDecimal.ROUND_HALF_DOWN);
				while (point < K) {
					point = point * 2;
					p_sub = p_sub.divide(BigDecimal.valueOf(2));
				}
				p = p.add(p_sub);
			}
			System.out.println(p);
		}
	}
} import java.math.BigDecimal; BigDecimal java.math import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();
			int K = sc.nextInt();

			BigDecimal p = new BigDecimal("0");
			for (int i = 1; i <= N; i++) {
				int point = i;
				BigDecimal p_sub = new BigDecimal("1");
				p_sub = p_sub.divide(BigDecimal.valueOf(N), 15, BigDecimal.ROUND_HALF_DOWN);
				while (point < K) {
					point = point * 2;
					p_sub = p_sub.divide(BigDecimal.valueOf(2));
				}
				p = p.add(p_sub);
			}
			System.out.println(p);
		}
	}
} Main public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();
			int K = sc.nextInt();

			BigDecimal p = new BigDecimal("0");
			for (int i = 1; i <= N; i++) {
				int point = i;
				BigDecimal p_sub = new BigDecimal("1");
				p_sub = p_sub.divide(BigDecimal.valueOf(N), 15, BigDecimal.ROUND_HALF_DOWN);
				while (point < K) {
					point = point * 2;
					p_sub = p_sub.divide(BigDecimal.valueOf(2));
				}
				p = p.add(p_sub);
			}
			System.out.println(p);
		}
	} main {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();
			int K = sc.nextInt();

			BigDecimal p = new BigDecimal("0");
			for (int i = 1; i <= N; i++) {
				int point = i;
				BigDecimal p_sub = new BigDecimal("1");
				p_sub = p_sub.divide(BigDecimal.valueOf(N), 15, BigDecimal.ROUND_HALF_DOWN);
				while (point < K) {
					point = point * 2;
					p_sub = p_sub.divide(BigDecimal.valueOf(2));
				}
				p = p.add(p_sub);
			}
			System.out.println(p);
		}
	} try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();
			int K = sc.nextInt();

			BigDecimal p = new BigDecimal("0");
			for (int i = 1; i <= N; i++) {
				int point = i;
				BigDecimal p_sub = new BigDecimal("1");
				p_sub = p_sub.divide(BigDecimal.valueOf(N), 15, BigDecimal.ROUND_HALF_DOWN);
				while (point < K) {
					point = point * 2;
					p_sub = p_sub.divide(BigDecimal.valueOf(2));
				}
				p = p.add(p_sub);
			}
			System.out.println(p);
		} {
			int N = sc.nextInt();
			int K = sc.nextInt();

			BigDecimal p = new BigDecimal("0");
			for (int i = 1; i <= N; i++) {
				int point = i;
				BigDecimal p_sub = new BigDecimal("1");
				p_sub = p_sub.divide(BigDecimal.valueOf(N), 15, BigDecimal.ROUND_HALF_DOWN);
				while (point < K) {
					point = point * 2;
					p_sub = p_sub.divide(BigDecimal.valueOf(2));
				}
				p = p.add(p_sub);
			}
			System.out.println(p);
		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int K = sc.nextInt(); K sc.nextInt() sc.nextInt sc BigDecimal p = new BigDecimal("0"); p new BigDecimal("0") for (int i = 1; i <= N; i++) {
				int point = i;
				BigDecimal p_sub = new BigDecimal("1");
				p_sub = p_sub.divide(BigDecimal.valueOf(N), 15, BigDecimal.ROUND_HALF_DOWN);
				while (point < K) {
					point = point * 2;
					p_sub = p_sub.divide(BigDecimal.valueOf(2));
				}
				p = p.add(p_sub);
			} int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
				int point = i;
				BigDecimal p_sub = new BigDecimal("1");
				p_sub = p_sub.divide(BigDecimal.valueOf(N), 15, BigDecimal.ROUND_HALF_DOWN);
				while (point < K) {
					point = point * 2;
					p_sub = p_sub.divide(BigDecimal.valueOf(2));
				}
				p = p.add(p_sub);
			} {
				int point = i;
				BigDecimal p_sub = new BigDecimal("1");
				p_sub = p_sub.divide(BigDecimal.valueOf(N), 15, BigDecimal.ROUND_HALF_DOWN);
				while (point < K) {
					point = point * 2;
					p_sub = p_sub.divide(BigDecimal.valueOf(2));
				}
				p = p.add(p_sub);
			} int point = i; point i BigDecimal p_sub = new BigDecimal("1"); p_sub new BigDecimal("1") p_sub = p_sub.divide(BigDecimal.valueOf(N), 15, BigDecimal.ROUND_HALF_DOWN) p_sub p_sub.divide(BigDecimal.valueOf(N), 15, BigDecimal.ROUND_HALF_DOWN) p_sub.divide p_sub BigDecimal.valueOf(N) BigDecimal.valueOf BigDecimal N 15 BigDecimal.ROUND_HALF_DOWN BigDecimal BigDecimal.ROUND_HALF_DOWN while (point < K) {
					point = point * 2;
					p_sub = p_sub.divide(BigDecimal.valueOf(2));
				} point < K point K {
					point = point * 2;
					p_sub = p_sub.divide(BigDecimal.valueOf(2));
				} point = point * 2 point point * 2 point 2 p_sub = p_sub.divide(BigDecimal.valueOf(2)) p_sub p_sub.divide(BigDecimal.valueOf(2)) p_sub.divide p_sub BigDecimal.valueOf(2) BigDecimal.valueOf BigDecimal 2 p = p.add(p_sub) p p.add(p_sub) p.add p p_sub System.out.println(p) System.out.println System.out System System.out p String[] args args public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();
			int K = sc.nextInt();

			BigDecimal p = new BigDecimal("0");
			for (int i = 1; i <= N; i++) {
				int point = i;
				BigDecimal p_sub = new BigDecimal("1");
				p_sub = p_sub.divide(BigDecimal.valueOf(N), 15, BigDecimal.ROUND_HALF_DOWN);
				while (point < K) {
					point = point * 2;
					p_sub = p_sub.divide(BigDecimal.valueOf(2));
				}
				p = p.add(p_sub);
			}
			System.out.println(p);
		}
	}
} public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();
			int K = sc.nextInt();

			BigDecimal p = new BigDecimal("0");
			for (int i = 1; i <= N; i++) {
				int point = i;
				BigDecimal p_sub = new BigDecimal("1");
				p_sub = p_sub.divide(BigDecimal.valueOf(N), 15, BigDecimal.ROUND_HALF_DOWN);
				while (point < K) {
					point = point * 2;
					p_sub = p_sub.divide(BigDecimal.valueOf(2));
				}
				p = p.add(p_sub);
			}
			System.out.println(p);
		}
	}
} Main
import java.math.BigDecimal;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();
			int K = sc.nextInt();

			BigDecimal p = new BigDecimal("0");
			for (int i = 1; i <= N; i++) {
				int point = i;
				BigDecimal p_sub = new BigDecimal("1");
				p_sub = p_sub.divide(BigDecimal.valueOf(N), 15, BigDecimal.ROUND_HALF_DOWN);
				while (point < K) {
					point = point * 2;
					p_sub = p_sub.divide(BigDecimal.valueOf(2));
				}
				p = p.add(p_sub);
			}
			System.out.println(p);
		}
	}
}