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 ans = 0;
		double n2 = n;
		double value = 1;

		for(double i=n;i>0;){
			if(i*value<k){
				value *= 2;
			} else {
				ans += 1.0/(n*value);
				i--;
			}
		}

		// 出力
		System.out.println(ans);
	}
} 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 ans = 0;
		double n2 = n;
		double value = 1;

		for(double i=n;i>0;){
			if(i*value<k){
				value *= 2;
			} else {
				ans += 1.0/(n*value);
				i--;
			}
		}

		// 出力
		System.out.println(ans);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 整数の入力
		int n = sc.nextInt();
		int k = sc.nextInt();

		double ans = 0;
		double n2 = n;
		double value = 1;

		for(double i=n;i>0;){
			if(i*value<k){
				value *= 2;
			} else {
				ans += 1.0/(n*value);
				i--;
			}
		}

		// 出力
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);

		// 整数の入力
		int n = sc.nextInt();
		int k = sc.nextInt();

		double ans = 0;
		double n2 = n;
		double value = 1;

		for(double i=n;i>0;){
			if(i*value<k){
				value *= 2;
			} else {
				ans += 1.0/(n*value);
				i--;
			}
		}

		// 出力
		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 ans = 0; ans 0 double n2 = n; n2 n double value = 1; value 1 for(double i=n;i>0;){
			if(i*value<k){
				value *= 2;
			} else {
				ans += 1.0/(n*value);
				i--;
			}
		} double i=n; double i=n; i n i>0 i 0 {
			if(i*value<k){
				value *= 2;
			} else {
				ans += 1.0/(n*value);
				i--;
			}
		} {
			if(i*value<k){
				value *= 2;
			} else {
				ans += 1.0/(n*value);
				i--;
			}
		} if(i*value<k){
				value *= 2;
			} else {
				ans += 1.0/(n*value);
				i--;
			} i*value<k i*value i value k {
				value *= 2;
			} value *= 2 value 2 {
				ans += 1.0/(n*value);
				i--;
			} ans += 1.0/(n*value) ans 1.0/(n*value) 1.0 (n*value) n value i-- i 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){
		Scanner sc = new Scanner(System.in);

		// 整数の入力
		int n = sc.nextInt();
		int k = sc.nextInt();

		double ans = 0;
		double n2 = n;
		double value = 1;

		for(double i=n;i>0;){
			if(i*value<k){
				value *= 2;
			} else {
				ans += 1.0/(n*value);
				i--;
			}
		}

		// 出力
		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 整数の入力
		int n = sc.nextInt();
		int k = sc.nextInt();

		double ans = 0;
		double n2 = n;
		double value = 1;

		for(double i=n;i>0;){
			if(i*value<k){
				value *= 2;
			} else {
				ans += 1.0/(n*value);
				i--;
			}
		}

		// 出力
		System.out.println(ans);
	}
} 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 ans = 0;
		double n2 = n;
		double value = 1;

		for(double i=n;i>0;){
			if(i*value<k){
				value *= 2;
			} else {
				ans += 1.0/(n*value);
				i--;
			}
		}

		// 出力
		System.out.println(ans);
	}
}