import java.util.*;

public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner sc = new Scanner(System.in);

        double n = sc.nextInt();
        double k = sc.nextInt();

        double ans = 0;

        for (double i = 1; i <= n; i++) {
            double kakuritu = 1;
            double point = i;

            while (point < k) {
                point *= 2;
                kakuritu *= 0.5;
            }

            ans += 1 / n * kakuritu;
        }

        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner sc = new Scanner(System.in);

        double n = sc.nextInt();
        double k = sc.nextInt();

        double ans = 0;

        for (double i = 1; i <= n; i++) {
            double kakuritu = 1;
            double point = i;

            while (point < k) {
                point *= 2;
                kakuritu *= 0.5;
            }

            ans += 1 / n * kakuritu;
        }

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

        double n = sc.nextInt();
        double k = sc.nextInt();

        double ans = 0;

        for (double i = 1; i <= n; i++) {
            double kakuritu = 1;
            double point = i;

            while (point < k) {
                point *= 2;
                kakuritu *= 0.5;
            }

            ans += 1 / n * kakuritu;
        }

        System.out.println(ans);
    } main {
        // write your code here
        Scanner sc = new Scanner(System.in);

        double n = sc.nextInt();
        double k = sc.nextInt();

        double ans = 0;

        for (double i = 1; i <= n; i++) {
            double kakuritu = 1;
            double point = i;

            while (point < k) {
                point *= 2;
                kakuritu *= 0.5;
            }

            ans += 1 / n * kakuritu;
        }

        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) double n = sc.nextInt(); n sc.nextInt() sc.nextInt sc double k = sc.nextInt(); k sc.nextInt() sc.nextInt sc double ans = 0; ans 0 for (double i = 1; i <= n; i++) {
            double kakuritu = 1;
            double point = i;

            while (point < k) {
                point *= 2;
                kakuritu *= 0.5;
            }

            ans += 1 / n * kakuritu;
        } double i = 1; double i = 1; i 1 i <= n i n i++ i++ i {
            double kakuritu = 1;
            double point = i;

            while (point < k) {
                point *= 2;
                kakuritu *= 0.5;
            }

            ans += 1 / n * kakuritu;
        } {
            double kakuritu = 1;
            double point = i;

            while (point < k) {
                point *= 2;
                kakuritu *= 0.5;
            }

            ans += 1 / n * kakuritu;
        } double kakuritu = 1; kakuritu 1 double point = i; point i while (point < k) {
                point *= 2;
                kakuritu *= 0.5;
            } point < k point k {
                point *= 2;
                kakuritu *= 0.5;
            } point *= 2 point 2 kakuritu *= 0.5 kakuritu 0.5 ans += 1 / n * kakuritu ans 1 / n * kakuritu 1 / n 1 n kakuritu 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) {
        // write your code here
        Scanner sc = new Scanner(System.in);

        double n = sc.nextInt();
        double k = sc.nextInt();

        double ans = 0;

        for (double i = 1; i <= n; i++) {
            double kakuritu = 1;
            double point = i;

            while (point < k) {
                point *= 2;
                kakuritu *= 0.5;
            }

            ans += 1 / n * kakuritu;
        }

        System.out.println(ans);
    }
} public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner sc = new Scanner(System.in);

        double n = sc.nextInt();
        double k = sc.nextInt();

        double ans = 0;

        for (double i = 1; i <= n; i++) {
            double kakuritu = 1;
            double point = i;

            while (point < k) {
                point *= 2;
                kakuritu *= 0.5;
            }

            ans += 1 / n * kakuritu;
        }

        System.out.println(ans);
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner sc = new Scanner(System.in);

        double n = sc.nextInt();
        double k = sc.nextInt();

        double ans = 0;

        for (double i = 1; i <= n; i++) {
            double kakuritu = 1;
            double point = i;

            while (point < k) {
                point *= 2;
                kakuritu *= 0.5;
            }

            ans += 1 / n * kakuritu;
        }

        System.out.println(ans);
    }
}