import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner $ = new Scanner(System.in);
		int N = $.nextInt(), K = $.nextInt();
		double sum = 0.0;
		for (int i = 0; i < N; i++){
			double p = 1.0;
			for (int M = 1; M * (i + 1) < K; M *= 2){
				p *= 1.0 / 2.0;
			}
			sum += p;
			//System.out.println(p);
		}
		System.out.println(sum / N);
		/*
		3 10 -> 0.145833333333
		100000 5 -> 0.999973749998
		*/
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) throws Exception {
		Scanner $ = new Scanner(System.in);
		int N = $.nextInt(), K = $.nextInt();
		double sum = 0.0;
		for (int i = 0; i < N; i++){
			double p = 1.0;
			for (int M = 1; M * (i + 1) < K; M *= 2){
				p *= 1.0 / 2.0;
			}
			sum += p;
			//System.out.println(p);
		}
		System.out.println(sum / N);
		/*
		3 10 -> 0.145833333333
		100000 5 -> 0.999973749998
		*/
	}
} Main public static void main(String[] args) throws Exception {
		Scanner $ = new Scanner(System.in);
		int N = $.nextInt(), K = $.nextInt();
		double sum = 0.0;
		for (int i = 0; i < N; i++){
			double p = 1.0;
			for (int M = 1; M * (i + 1) < K; M *= 2){
				p *= 1.0 / 2.0;
			}
			sum += p;
			//System.out.println(p);
		}
		System.out.println(sum / N);
		/*
		3 10 -> 0.145833333333
		100000 5 -> 0.999973749998
		*/
	} main {
		Scanner $ = new Scanner(System.in);
		int N = $.nextInt(), K = $.nextInt();
		double sum = 0.0;
		for (int i = 0; i < N; i++){
			double p = 1.0;
			for (int M = 1; M * (i + 1) < K; M *= 2){
				p *= 1.0 / 2.0;
			}
			sum += p;
			//System.out.println(p);
		}
		System.out.println(sum / N);
		/*
		3 10 -> 0.145833333333
		100000 5 -> 0.999973749998
		*/
	} Scanner $ = new Scanner(System.in); $ new Scanner(System.in) int N = $.nextInt() N $.nextInt() $.nextInt $ K = $.nextInt(); K $.nextInt() $.nextInt $ double sum = 0.0; sum 0.0 for (int i = 0; i < N; i++){
			double p = 1.0;
			for (int M = 1; M * (i + 1) < K; M *= 2){
				p *= 1.0 / 2.0;
			}
			sum += p;
			//System.out.println(p);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			double p = 1.0;
			for (int M = 1; M * (i + 1) < K; M *= 2){
				p *= 1.0 / 2.0;
			}
			sum += p;
			//System.out.println(p);
		} {
			double p = 1.0;
			for (int M = 1; M * (i + 1) < K; M *= 2){
				p *= 1.0 / 2.0;
			}
			sum += p;
			//System.out.println(p);
		} double p = 1.0; p 1.0 for (int M = 1; M * (i + 1) < K; M *= 2){
				p *= 1.0 / 2.0;
			} int M = 1; int M = 1; M 1 M * (i + 1) < K M * (i + 1) M (i + 1) i 1 K M *= 2 M *= 2 M 2 {
				p *= 1.0 / 2.0;
			} {
				p *= 1.0 / 2.0;
			} p *= 1.0 / 2.0 p 1.0 / 2.0 1.0 2.0 sum += p sum p 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) throws Exception {
		Scanner $ = new Scanner(System.in);
		int N = $.nextInt(), K = $.nextInt();
		double sum = 0.0;
		for (int i = 0; i < N; i++){
			double p = 1.0;
			for (int M = 1; M * (i + 1) < K; M *= 2){
				p *= 1.0 / 2.0;
			}
			sum += p;
			//System.out.println(p);
		}
		System.out.println(sum / N);
		/*
		3 10 -> 0.145833333333
		100000 5 -> 0.999973749998
		*/
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		Scanner $ = new Scanner(System.in);
		int N = $.nextInt(), K = $.nextInt();
		double sum = 0.0;
		for (int i = 0; i < N; i++){
			double p = 1.0;
			for (int M = 1; M * (i + 1) < K; M *= 2){
				p *= 1.0 / 2.0;
			}
			sum += p;
			//System.out.println(p);
		}
		System.out.println(sum / N);
		/*
		3 10 -> 0.145833333333
		100000 5 -> 0.999973749998
		*/
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner $ = new Scanner(System.in);
		int N = $.nextInt(), K = $.nextInt();
		double sum = 0.0;
		for (int i = 0; i < N; i++){
			double p = 1.0;
			for (int M = 1; M * (i + 1) < K; M *= 2){
				p *= 1.0 / 2.0;
			}
			sum += p;
			//System.out.println(p);
		}
		System.out.println(sum / N);
		/*
		3 10 -> 0.145833333333
		100000 5 -> 0.999973749998
		*/
	}
}
