import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		double f_ans = 0;

		for (int i=1; i<N+1; i++) {
			double point = i;
			double cnt=0;

			while (true) {
				if (point>=K) {
					break;
				}
				point *= 2;
				cnt += 1;
			}
			double per = 1/Math.pow(2,cnt);
			f_ans += per;
		}


		double ans = f_ans/N;
		System.out.println(ans);


	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		double f_ans = 0;

		for (int i=1; i<N+1; i++) {
			double point = i;
			double cnt=0;

			while (true) {
				if (point>=K) {
					break;
				}
				point *= 2;
				cnt += 1;
			}
			double per = 1/Math.pow(2,cnt);
			f_ans += per;
		}


		double ans = f_ans/N;
		System.out.println(ans);


	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		double f_ans = 0;

		for (int i=1; i<N+1; i++) {
			double point = i;
			double cnt=0;

			while (true) {
				if (point>=K) {
					break;
				}
				point *= 2;
				cnt += 1;
			}
			double per = 1/Math.pow(2,cnt);
			f_ans += per;
		}


		double ans = f_ans/N;
		System.out.println(ans);


	} main {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		double f_ans = 0;

		for (int i=1; i<N+1; i++) {
			double point = i;
			double cnt=0;

			while (true) {
				if (point>=K) {
					break;
				}
				point *= 2;
				cnt += 1;
			}
			double per = 1/Math.pow(2,cnt);
			f_ans += per;
		}


		double ans = f_ans/N;
		System.out.println(ans);


	} 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 f_ans = 0; f_ans 0 for (int i=1; i<N+1; i++) {
			double point = i;
			double cnt=0;

			while (true) {
				if (point>=K) {
					break;
				}
				point *= 2;
				cnt += 1;
			}
			double per = 1/Math.pow(2,cnt);
			f_ans += per;
		} int i=1; int i=1; i 1 i<N+1 i N+1 N 1 i++ i++ i {
			double point = i;
			double cnt=0;

			while (true) {
				if (point>=K) {
					break;
				}
				point *= 2;
				cnt += 1;
			}
			double per = 1/Math.pow(2,cnt);
			f_ans += per;
		} {
			double point = i;
			double cnt=0;

			while (true) {
				if (point>=K) {
					break;
				}
				point *= 2;
				cnt += 1;
			}
			double per = 1/Math.pow(2,cnt);
			f_ans += per;
		} double point = i; point i double cnt=0; cnt 0 while (true) {
				if (point>=K) {
					break;
				}
				point *= 2;
				cnt += 1;
			} true {
				if (point>=K) {
					break;
				}
				point *= 2;
				cnt += 1;
			} if (point>=K) {
					break;
				} point>=K point K {
					break;
				} break; point *= 2 point 2 cnt += 1 cnt 1 double per = 1/Math.pow(2,cnt); per 1/Math.pow(2,cnt) 1 Math.pow(2,cnt) Math.pow Math 2 cnt f_ans += per f_ans per double ans = f_ans/N; ans f_ans/N f_ans N System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		double f_ans = 0;

		for (int i=1; i<N+1; i++) {
			double point = i;
			double cnt=0;

			while (true) {
				if (point>=K) {
					break;
				}
				point *= 2;
				cnt += 1;
			}
			double per = 1/Math.pow(2,cnt);
			f_ans += per;
		}


		double ans = f_ans/N;
		System.out.println(ans);


	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		double f_ans = 0;

		for (int i=1; i<N+1; i++) {
			double point = i;
			double cnt=0;

			while (true) {
				if (point>=K) {
					break;
				}
				point *= 2;
				cnt += 1;
			}
			double per = 1/Math.pow(2,cnt);
			f_ans += per;
		}


		double ans = f_ans/N;
		System.out.println(ans);


	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		double f_ans = 0;

		for (int i=1; i<N+1; i++) {
			double point = i;
			double cnt=0;

			while (true) {
				if (point>=K) {
					break;
				}
				point *= 2;
				cnt += 1;
			}
			double per = 1/Math.pow(2,cnt);
			f_ans += per;
		}


		double ans = f_ans/N;
		System.out.println(ans);


	}

}