import java.util.*;

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

		double sum = 0;
		for (int i = 1; i <= N; i++) {
			double x = 1;
			while (i * x < K) {
				x *= 2;
			}
			sum += (1 / x);
		}
		System.out.println(sum / N);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();

		double sum = 0;
		for (int i = 1; i <= N; i++) {
			double x = 1;
			while (i * x < K) {
				x *= 2;
			}
			sum += (1 / x);
		}
		System.out.println(sum / N);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();

		double sum = 0;
		for (int i = 1; i <= N; i++) {
			double x = 1;
			while (i * x < K) {
				x *= 2;
			}
			sum += (1 / x);
		}
		System.out.println(sum / N);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();

		double sum = 0;
		for (int i = 1; i <= N; i++) {
			double x = 1;
			while (i * x < K) {
				x *= 2;
			}
			sum += (1 / x);
		}
		System.out.println(sum / N);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int K = sc.nextInt(); K sc.nextInt() sc.nextInt sc double sum = 0; sum 0 for (int i = 1; i <= N; i++) {
			double x = 1;
			while (i * x < K) {
				x *= 2;
			}
			sum += (1 / x);
		} int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
			double x = 1;
			while (i * x < K) {
				x *= 2;
			}
			sum += (1 / x);
		} {
			double x = 1;
			while (i * x < K) {
				x *= 2;
			}
			sum += (1 / x);
		} double x = 1; x 1 while (i * x < K) {
				x *= 2;
			} i * x < K i * x i x K {
				x *= 2;
			} x *= 2 x 2 sum += (1 / x) sum (1 / x) 1 x System.out.println(sum / N) System.out.println System.out System System.out sum / N sum N String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();

		double sum = 0;
		for (int i = 1; i <= N; i++) {
			double x = 1;
			while (i * x < K) {
				x *= 2;
			}
			sum += (1 / x);
		}
		System.out.println(sum / N);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();

		double sum = 0;
		for (int i = 1; i <= N; i++) {
			double x = 1;
			while (i * x < K) {
				x *= 2;
			}
			sum += (1 / x);
		}
		System.out.println(sum / N);
	}
} Main
import java.util.*;

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

		double sum = 0;
		for (int i = 1; i <= N; i++) {
			double x = 1;
			while (i * x < K) {
				x *= 2;
			}
			sum += (1 / x);
		}
		System.out.println(sum / N);
	}
}
