import java.util.*;

public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int k=sc.nextInt();
		double ans = 0.0;
		for(int i=1; i<=n; i++) {
			int x = 1;
			int j=i;
			while(j<k) {
				x *= 2;
				j *= 2;
			}
			x *= n;
			ans += (double)1/(double)x;
		}
		System.out.println(ans);
		sc.close();
	}

} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int k=sc.nextInt();
		double ans = 0.0;
		for(int i=1; i<=n; i++) {
			int x = 1;
			int j=i;
			while(j<k) {
				x *= 2;
				j *= 2;
			}
			x *= n;
			ans += (double)1/(double)x;
		}
		System.out.println(ans);
		sc.close();
	}

} Main public static void main(String[] args) {
		Main main = new Main();
		main.run();
	} main {
		Main main = new Main();
		main.run();
	} Main main = new Main(); main new Main() main.run() main.run main String[] args args public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int k=sc.nextInt();
		double ans = 0.0;
		for(int i=1; i<=n; i++) {
			int x = 1;
			int j=i;
			while(j<k) {
				x *= 2;
				j *= 2;
			}
			x *= n;
			ans += (double)1/(double)x;
		}
		System.out.println(ans);
		sc.close();
	} run {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int k=sc.nextInt();
		double ans = 0.0;
		for(int i=1; i<=n; i++) {
			int x = 1;
			int j=i;
			while(j<k) {
				x *= 2;
				j *= 2;
			}
			x *= n;
			ans += (double)1/(double)x;
		}
		System.out.println(ans);
		sc.close();
	} 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.0; ans 0.0 for(int i=1; i<=n; i++) {
			int x = 1;
			int j=i;
			while(j<k) {
				x *= 2;
				j *= 2;
			}
			x *= n;
			ans += (double)1/(double)x;
		} int i=1; int i=1; i 1 i<=n i n i++ i++ i {
			int x = 1;
			int j=i;
			while(j<k) {
				x *= 2;
				j *= 2;
			}
			x *= n;
			ans += (double)1/(double)x;
		} {
			int x = 1;
			int j=i;
			while(j<k) {
				x *= 2;
				j *= 2;
			}
			x *= n;
			ans += (double)1/(double)x;
		} int x = 1; x 1 int j=i; j i while(j<k) {
				x *= 2;
				j *= 2;
			} j<k j k {
				x *= 2;
				j *= 2;
			} x *= 2 x 2 j *= 2 j 2 x *= n x n ans += (double)1/(double)x ans (double)1/(double)x (double)1 (double)x System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int k=sc.nextInt();
		double ans = 0.0;
		for(int i=1; i<=n; i++) {
			int x = 1;
			int j=i;
			while(j<k) {
				x *= 2;
				j *= 2;
			}
			x *= n;
			ans += (double)1/(double)x;
		}
		System.out.println(ans);
		sc.close();
	}

} public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int k=sc.nextInt();
		double ans = 0.0;
		for(int i=1; i<=n; i++) {
			int x = 1;
			int j=i;
			while(j<k) {
				x *= 2;
				j *= 2;
			}
			x *= n;
			ans += (double)1/(double)x;
		}
		System.out.println(ans);
		sc.close();
	}

} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int k=sc.nextInt();
		double ans = 0.0;
		for(int i=1; i<=n; i++) {
			int x = 1;
			int j=i;
			while(j<k) {
				x *= 2;
				j *= 2;
			}
			x *= n;
			ans += (double)1/(double)x;
		}
		System.out.println(ans);
		sc.close();
	}

}
