import java.util.Arrays;
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String[] value = scan.nextLine().split(" ");
		int n   = Integer.parseInt(value[0]);
		int k 	 = Integer.parseInt(value[1]);
		long count = 0;
		double temp  = 0;
		double ans = 0;
		double x = 0;

		for(int i = 1; i <= n; i++) {

			temp = i;
			count = n;

			while(temp < k) {
				temp  *= 2;
				count *= 2;
			}

			ans += 1 / (double)count;

		}

		System.out.println(ans);

	}

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

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String[] value = scan.nextLine().split(" ");
		int n   = Integer.parseInt(value[0]);
		int k 	 = Integer.parseInt(value[1]);
		long count = 0;
		double temp  = 0;
		double ans = 0;
		double x = 0;

		for(int i = 1; i <= n; i++) {

			temp = i;
			count = n;

			while(temp < k) {
				temp  *= 2;
				count *= 2;
			}

			ans += 1 / (double)count;

		}

		System.out.println(ans);

	}

} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String[] value = scan.nextLine().split(" ");
		int n   = Integer.parseInt(value[0]);
		int k 	 = Integer.parseInt(value[1]);
		long count = 0;
		double temp  = 0;
		double ans = 0;
		double x = 0;

		for(int i = 1; i <= n; i++) {

			temp = i;
			count = n;

			while(temp < k) {
				temp  *= 2;
				count *= 2;
			}

			ans += 1 / (double)count;

		}

		System.out.println(ans);

	} main {

		Scanner scan = new Scanner(System.in);

		String[] value = scan.nextLine().split(" ");
		int n   = Integer.parseInt(value[0]);
		int k 	 = Integer.parseInt(value[1]);
		long count = 0;
		double temp  = 0;
		double ans = 0;
		double x = 0;

		for(int i = 1; i <= n; i++) {

			temp = i;
			count = n;

			while(temp < k) {
				temp  *= 2;
				count *= 2;
			}

			ans += 1 / (double)count;

		}

		System.out.println(ans);

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String[] value = scan.nextLine().split(" "); value scan.nextLine().split(" ") scan.nextLine().split scan.nextLine() scan.nextLine scan " " int n   = Integer.parseInt(value[0]); n Integer.parseInt(value[0]) Integer.parseInt Integer value[0] value 0 int k 	 = Integer.parseInt(value[1]); k Integer.parseInt(value[1]) Integer.parseInt Integer value[1] value 1 long count = 0; count 0 double temp  = 0; temp 0 double ans = 0; ans 0 double x = 0; x 0 for(int i = 1; i <= n; i++) {

			temp = i;
			count = n;

			while(temp < k) {
				temp  *= 2;
				count *= 2;
			}

			ans += 1 / (double)count;

		} int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {

			temp = i;
			count = n;

			while(temp < k) {
				temp  *= 2;
				count *= 2;
			}

			ans += 1 / (double)count;

		} {

			temp = i;
			count = n;

			while(temp < k) {
				temp  *= 2;
				count *= 2;
			}

			ans += 1 / (double)count;

		} temp = i temp i count = n count n while(temp < k) {
				temp  *= 2;
				count *= 2;
			} temp < k temp k {
				temp  *= 2;
				count *= 2;
			} temp  *= 2 temp 2 count *= 2 count 2 ans += 1 / (double)count ans 1 / (double)count 1 (double)count 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 scan = new Scanner(System.in);

		String[] value = scan.nextLine().split(" ");
		int n   = Integer.parseInt(value[0]);
		int k 	 = Integer.parseInt(value[1]);
		long count = 0;
		double temp  = 0;
		double ans = 0;
		double x = 0;

		for(int i = 1; i <= n; i++) {

			temp = i;
			count = n;

			while(temp < k) {
				temp  *= 2;
				count *= 2;
			}

			ans += 1 / (double)count;

		}

		System.out.println(ans);

	}

} public class Main{

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String[] value = scan.nextLine().split(" ");
		int n   = Integer.parseInt(value[0]);
		int k 	 = Integer.parseInt(value[1]);
		long count = 0;
		double temp  = 0;
		double ans = 0;
		double x = 0;

		for(int i = 1; i <= n; i++) {

			temp = i;
			count = n;

			while(temp < k) {
				temp  *= 2;
				count *= 2;
			}

			ans += 1 / (double)count;

		}

		System.out.println(ans);

	}

} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String[] value = scan.nextLine().split(" ");
		int n   = Integer.parseInt(value[0]);
		int k 	 = Integer.parseInt(value[1]);
		long count = 0;
		double temp  = 0;
		double ans = 0;
		double x = 0;

		for(int i = 1; i <= n; i++) {

			temp = i;
			count = n;

			while(temp < k) {
				temp  *= 2;
				count *= 2;
			}

			ans += 1 / (double)count;

		}

		System.out.println(ans);

	}

}
