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

task3();

    }

    public static void task1(){
    	Scanner s = new Scanner(System.in);
	    int n = s.nextInt(), m = s.nextInt() - 1;
	    char[] cs = s.next().toCharArray();
	    //A - a = -32
	    cs[m] += ('a' - 'A');
	    System.out.println(cs);
	}

	public static void task2(){
		Scanner s = new Scanner((System.in));
		int n = s.nextInt();
		int fh = n / 100;
		int sh = n % 100;
		System.out.println(isMonth(fh) ? (isMonth(sh) ? "AMBIGUOUS " : "MMYY") : (isMonth(sh) ? "YYMM" : "NA"));
	}

    public static Boolean isMonth(int i){
    	return (1 <= i) && (i <= 12);
	}

	public static void task3(){
    	Scanner s = new Scanner(System.in);
    	int n = s.nextInt(), k = s.nextInt();
		double ans = 0;
		for (int i = 1; i <= n; i ++){
			double tmp = i;
			while (tmp < k){
				tmp *= 2;
			}
			ans += (1/(tmp/(i * 1.0))) * (1/ (1.0 * n));
		}

		System.out.println(ans);

	}




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

task3();

    }

    public static void task1(){
    	Scanner s = new Scanner(System.in);
	    int n = s.nextInt(), m = s.nextInt() - 1;
	    char[] cs = s.next().toCharArray();
	    //A - a = -32
	    cs[m] += ('a' - 'A');
	    System.out.println(cs);
	}

	public static void task2(){
		Scanner s = new Scanner((System.in));
		int n = s.nextInt();
		int fh = n / 100;
		int sh = n % 100;
		System.out.println(isMonth(fh) ? (isMonth(sh) ? "AMBIGUOUS " : "MMYY") : (isMonth(sh) ? "YYMM" : "NA"));
	}

    public static Boolean isMonth(int i){
    	return (1 <= i) && (i <= 12);
	}

	public static void task3(){
    	Scanner s = new Scanner(System.in);
    	int n = s.nextInt(), k = s.nextInt();
		double ans = 0;
		for (int i = 1; i <= n; i ++){
			double tmp = i;
			while (tmp < k){
				tmp *= 2;
			}
			ans += (1/(tmp/(i * 1.0))) * (1/ (1.0 * n));
		}

		System.out.println(ans);

	}




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

task3();

    } main {

task3();

    } task3() task3 String[] args args public static void task1(){
    	Scanner s = new Scanner(System.in);
	    int n = s.nextInt(), m = s.nextInt() - 1;
	    char[] cs = s.next().toCharArray();
	    //A - a = -32
	    cs[m] += ('a' - 'A');
	    System.out.println(cs);
	} task1 {
    	Scanner s = new Scanner(System.in);
	    int n = s.nextInt(), m = s.nextInt() - 1;
	    char[] cs = s.next().toCharArray();
	    //A - a = -32
	    cs[m] += ('a' - 'A');
	    System.out.println(cs);
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int n = s.nextInt() n s.nextInt() s.nextInt s m = s.nextInt() - 1; m s.nextInt() - 1 s.nextInt() s.nextInt s 1 char[] cs = s.next().toCharArray(); cs s.next().toCharArray() s.next().toCharArray s.next() s.next s cs[m] += ('a' - 'A') cs[m] cs m ('a' - 'A') 'a' 'A' System.out.println(cs) System.out.println System.out System System.out cs public static void task2(){
		Scanner s = new Scanner((System.in));
		int n = s.nextInt();
		int fh = n / 100;
		int sh = n % 100;
		System.out.println(isMonth(fh) ? (isMonth(sh) ? "AMBIGUOUS " : "MMYY") : (isMonth(sh) ? "YYMM" : "NA"));
	} task2 {
		Scanner s = new Scanner((System.in));
		int n = s.nextInt();
		int fh = n / 100;
		int sh = n % 100;
		System.out.println(isMonth(fh) ? (isMonth(sh) ? "AMBIGUOUS " : "MMYY") : (isMonth(sh) ? "YYMM" : "NA"));
	} Scanner s = new Scanner((System.in)); s new Scanner((System.in)) int n = s.nextInt(); n s.nextInt() s.nextInt s int fh = n / 100; fh n / 100 n 100 int sh = n % 100; sh n % 100 n 100 System.out.println(isMonth(fh) ? (isMonth(sh) ? "AMBIGUOUS " : "MMYY") : (isMonth(sh) ? "YYMM" : "NA")) System.out.println System.out System System.out isMonth(fh) ? (isMonth(sh) ? "AMBIGUOUS " : "MMYY") : (isMonth(sh) ? "YYMM" : "NA") isMonth(fh) isMonth fh (isMonth(sh) ? "AMBIGUOUS " : "MMYY") isMonth(sh) isMonth sh "AMBIGUOUS " "MMYY" (isMonth(sh) ? "YYMM" : "NA") isMonth(sh) isMonth sh "YYMM" "NA" public static Boolean isMonth(int i){
    	return (1 <= i) && (i <= 12);
	} isMonth {
    	return (1 <= i) && (i <= 12);
	} return (1 <= i) && (i <= 12); (1 <= i) && (i <= 12) (1 <= i) 1 i (i <= 12) i 12 int i i public static void task3(){
    	Scanner s = new Scanner(System.in);
    	int n = s.nextInt(), k = s.nextInt();
		double ans = 0;
		for (int i = 1; i <= n; i ++){
			double tmp = i;
			while (tmp < k){
				tmp *= 2;
			}
			ans += (1/(tmp/(i * 1.0))) * (1/ (1.0 * n));
		}

		System.out.println(ans);

	} task3 {
    	Scanner s = new Scanner(System.in);
    	int n = s.nextInt(), k = s.nextInt();
		double ans = 0;
		for (int i = 1; i <= n; i ++){
			double tmp = i;
			while (tmp < k){
				tmp *= 2;
			}
			ans += (1/(tmp/(i * 1.0))) * (1/ (1.0 * n));
		}

		System.out.println(ans);

	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int n = s.nextInt() n s.nextInt() s.nextInt s k = s.nextInt(); k s.nextInt() s.nextInt s double ans = 0; ans 0 for (int i = 1; i <= n; i ++){
			double tmp = i;
			while (tmp < k){
				tmp *= 2;
			}
			ans += (1/(tmp/(i * 1.0))) * (1/ (1.0 * n));
		} int i = 1; int i = 1; i 1 i <= n i n i ++ i ++ i {
			double tmp = i;
			while (tmp < k){
				tmp *= 2;
			}
			ans += (1/(tmp/(i * 1.0))) * (1/ (1.0 * n));
		} {
			double tmp = i;
			while (tmp < k){
				tmp *= 2;
			}
			ans += (1/(tmp/(i * 1.0))) * (1/ (1.0 * n));
		} double tmp = i; tmp i while (tmp < k){
				tmp *= 2;
			} tmp < k tmp k {
				tmp *= 2;
			} tmp *= 2 tmp 2 ans += (1/(tmp/(i * 1.0))) * (1/ (1.0 * n)) ans (1/(tmp/(i * 1.0))) * (1/ (1.0 * n)) (1/(tmp/(i * 1.0))) 1 (tmp/(i * 1.0)) tmp (i * 1.0) i 1.0 (1/ (1.0 * n)) 1 (1.0 * n) 1.0 n System.out.println(ans) System.out.println System.out System System.out ans public class Main {
    public static void main(String[] args) {

task3();

    }

    public static void task1(){
    	Scanner s = new Scanner(System.in);
	    int n = s.nextInt(), m = s.nextInt() - 1;
	    char[] cs = s.next().toCharArray();
	    //A - a = -32
	    cs[m] += ('a' - 'A');
	    System.out.println(cs);
	}

	public static void task2(){
		Scanner s = new Scanner((System.in));
		int n = s.nextInt();
		int fh = n / 100;
		int sh = n % 100;
		System.out.println(isMonth(fh) ? (isMonth(sh) ? "AMBIGUOUS " : "MMYY") : (isMonth(sh) ? "YYMM" : "NA"));
	}

    public static Boolean isMonth(int i){
    	return (1 <= i) && (i <= 12);
	}

	public static void task3(){
    	Scanner s = new Scanner(System.in);
    	int n = s.nextInt(), k = s.nextInt();
		double ans = 0;
		for (int i = 1; i <= n; i ++){
			double tmp = i;
			while (tmp < k){
				tmp *= 2;
			}
			ans += (1/(tmp/(i * 1.0))) * (1/ (1.0 * n));
		}

		System.out.println(ans);

	}




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

task3();

    }

    public static void task1(){
    	Scanner s = new Scanner(System.in);
	    int n = s.nextInt(), m = s.nextInt() - 1;
	    char[] cs = s.next().toCharArray();
	    //A - a = -32
	    cs[m] += ('a' - 'A');
	    System.out.println(cs);
	}

	public static void task2(){
		Scanner s = new Scanner((System.in));
		int n = s.nextInt();
		int fh = n / 100;
		int sh = n % 100;
		System.out.println(isMonth(fh) ? (isMonth(sh) ? "AMBIGUOUS " : "MMYY") : (isMonth(sh) ? "YYMM" : "NA"));
	}

    public static Boolean isMonth(int i){
    	return (1 <= i) && (i <= 12);
	}

	public static void task3(){
    	Scanner s = new Scanner(System.in);
    	int n = s.nextInt(), k = s.nextInt();
		double ans = 0;
		for (int i = 1; i <= n; i ++){
			double tmp = i;
			while (tmp < k){
				tmp *= 2;
			}
			ans += (1/(tmp/(i * 1.0))) * (1/ (1.0 * n));
		}

		System.out.println(ans);

	}




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

task3();

    }

    public static void task1(){
    	Scanner s = new Scanner(System.in);
	    int n = s.nextInt(), m = s.nextInt() - 1;
	    char[] cs = s.next().toCharArray();
	    //A - a = -32
	    cs[m] += ('a' - 'A');
	    System.out.println(cs);
	}

	public static void task2(){
		Scanner s = new Scanner((System.in));
		int n = s.nextInt();
		int fh = n / 100;
		int sh = n % 100;
		System.out.println(isMonth(fh) ? (isMonth(sh) ? "AMBIGUOUS " : "MMYY") : (isMonth(sh) ? "YYMM" : "NA"));
	}

    public static Boolean isMonth(int i){
    	return (1 <= i) && (i <= 12);
	}

	public static void task3(){
    	Scanner s = new Scanner(System.in);
    	int n = s.nextInt(), k = s.nextInt();
		double ans = 0;
		for (int i = 1; i <= n; i ++){
			double tmp = i;
			while (tmp < k){
				tmp *= 2;
			}
			ans += (1/(tmp/(i * 1.0))) * (1/ (1.0 * n));
		}

		System.out.println(ans);

	}




}
