import java.util.Scanner;

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++) {
			sum += (Math.pow(0.5, count(i, k)) / n);
		}
		System.out.println(sum);
	}


	private static int count(int i, int k) {
		int countDouble = 0;
		while(i < k) {
			i *= 2;
			countDouble++;
		}
		return countDouble;
	}
} import java.util.Scanner; Scanner 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++) {
			sum += (Math.pow(0.5, count(i, k)) / n);
		}
		System.out.println(sum);
	}


	private static int count(int i, int k) {
		int countDouble = 0;
		while(i < k) {
			i *= 2;
			countDouble++;
		}
		return countDouble;
	}
} 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++) {
			sum += (Math.pow(0.5, count(i, k)) / n);
		}
		System.out.println(sum);
	} 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++) {
			sum += (Math.pow(0.5, count(i, k)) / n);
		}
		System.out.println(sum);
	} 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++) {
			sum += (Math.pow(0.5, count(i, k)) / n);
		} int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
			sum += (Math.pow(0.5, count(i, k)) / n);
		} {
			sum += (Math.pow(0.5, count(i, k)) / n);
		} sum += (Math.pow(0.5, count(i, k)) / n) sum (Math.pow(0.5, count(i, k)) / n) Math.pow(0.5, count(i, k)) Math.pow Math 0.5 count(i, k) count i k n System.out.println(sum) System.out.println System.out System System.out sum String[] args args private static int count(int i, int k) {
		int countDouble = 0;
		while(i < k) {
			i *= 2;
			countDouble++;
		}
		return countDouble;
	} count {
		int countDouble = 0;
		while(i < k) {
			i *= 2;
			countDouble++;
		}
		return countDouble;
	} int countDouble = 0; countDouble 0 while(i < k) {
			i *= 2;
			countDouble++;
		} i < k i k {
			i *= 2;
			countDouble++;
		} i *= 2 i 2 countDouble++ countDouble return countDouble; countDouble int i i int k k 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++) {
			sum += (Math.pow(0.5, count(i, k)) / n);
		}
		System.out.println(sum);
	}


	private static int count(int i, int k) {
		int countDouble = 0;
		while(i < k) {
			i *= 2;
			countDouble++;
		}
		return countDouble;
	}
} 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++) {
			sum += (Math.pow(0.5, count(i, k)) / n);
		}
		System.out.println(sum);
	}


	private static int count(int i, int k) {
		int countDouble = 0;
		while(i < k) {
			i *= 2;
			countDouble++;
		}
		return countDouble;
	}
} Main
import java.util.Scanner;

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++) {
			sum += (Math.pow(0.5, count(i, k)) / n);
		}
		System.out.println(sum);
	}


	private static int count(int i, int k) {
		int countDouble = 0;
		while(i < k) {
			i *= 2;
			countDouble++;
		}
		return countDouble;
	}
}
