import java.util.*;

public class Main {
    static long mod = 1000000007;

    public static double calc(double x) {
        if (x <= 1.0) {
            return 1.0;
        } else {
            return Math.pow(0.5, Math.ceil(Math.log(x) / Math.log(2)));
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        double res = 0.0;

        for (int i = 1; i <= n; ++i) {
            // System.out.println(String.format("%d: %f", i, Math.log(k / (double)i) / Math.log(2)));
            res += (calc(k / (double)i) / n);
        }
        System.out.println(res);
    }
} import java.util.*; util.* java public class Main {
    static long mod = 1000000007;

    public static double calc(double x) {
        if (x <= 1.0) {
            return 1.0;
        } else {
            return Math.pow(0.5, Math.ceil(Math.log(x) / Math.log(2)));
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        double res = 0.0;

        for (int i = 1; i <= n; ++i) {
            // System.out.println(String.format("%d: %f", i, Math.log(k / (double)i) / Math.log(2)));
            res += (calc(k / (double)i) / n);
        }
        System.out.println(res);
    }
} Main static long mod = 1000000007; mod 1000000007 public static double calc(double x) {
        if (x <= 1.0) {
            return 1.0;
        } else {
            return Math.pow(0.5, Math.ceil(Math.log(x) / Math.log(2)));
        }
    } calc {
        if (x <= 1.0) {
            return 1.0;
        } else {
            return Math.pow(0.5, Math.ceil(Math.log(x) / Math.log(2)));
        }
    } if (x <= 1.0) {
            return 1.0;
        } else {
            return Math.pow(0.5, Math.ceil(Math.log(x) / Math.log(2)));
        } x <= 1.0 x 1.0 {
            return 1.0;
        } return 1.0; 1.0 {
            return Math.pow(0.5, Math.ceil(Math.log(x) / Math.log(2)));
        } return Math.pow(0.5, Math.ceil(Math.log(x) / Math.log(2))); Math.pow(0.5, Math.ceil(Math.log(x) / Math.log(2))) Math.pow Math 0.5 Math.ceil(Math.log(x) / Math.log(2)) Math.ceil Math Math.log(x) / Math.log(2) Math.log(x) Math.log Math x Math.log(2) Math.log Math 2 double x x public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        double res = 0.0;

        for (int i = 1; i <= n; ++i) {
            // System.out.println(String.format("%d: %f", i, Math.log(k / (double)i) / Math.log(2)));
            res += (calc(k / (double)i) / n);
        }
        System.out.println(res);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        double res = 0.0;

        for (int i = 1; i <= n; ++i) {
            // System.out.println(String.format("%d: %f", i, Math.log(k / (double)i) / Math.log(2)));
            res += (calc(k / (double)i) / n);
        }
        System.out.println(res);
    } 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 res = 0.0; res 0.0 for (int i = 1; i <= n; ++i) {
            // System.out.println(String.format("%d: %f", i, Math.log(k / (double)i) / Math.log(2)));
            res += (calc(k / (double)i) / n);
        } int i = 1; int i = 1; i 1 i <= n i n ++i ++i i {
            // System.out.println(String.format("%d: %f", i, Math.log(k / (double)i) / Math.log(2)));
            res += (calc(k / (double)i) / n);
        } {
            // System.out.println(String.format("%d: %f", i, Math.log(k / (double)i) / Math.log(2)));
            res += (calc(k / (double)i) / n);
        } res += (calc(k / (double)i) / n) res (calc(k / (double)i) / n) calc(k / (double)i) calc k / (double)i k (double)i n System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {
    static long mod = 1000000007;

    public static double calc(double x) {
        if (x <= 1.0) {
            return 1.0;
        } else {
            return Math.pow(0.5, Math.ceil(Math.log(x) / Math.log(2)));
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        double res = 0.0;

        for (int i = 1; i <= n; ++i) {
            // System.out.println(String.format("%d: %f", i, Math.log(k / (double)i) / Math.log(2)));
            res += (calc(k / (double)i) / n);
        }
        System.out.println(res);
    }
} public class Main {
    static long mod = 1000000007;

    public static double calc(double x) {
        if (x <= 1.0) {
            return 1.0;
        } else {
            return Math.pow(0.5, Math.ceil(Math.log(x) / Math.log(2)));
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        double res = 0.0;

        for (int i = 1; i <= n; ++i) {
            // System.out.println(String.format("%d: %f", i, Math.log(k / (double)i) / Math.log(2)));
            res += (calc(k / (double)i) / n);
        }
        System.out.println(res);
    }
} Main
import java.util.*;

public class Main {
    static long mod = 1000000007;

    public static double calc(double x) {
        if (x <= 1.0) {
            return 1.0;
        } else {
            return Math.pow(0.5, Math.ceil(Math.log(x) / Math.log(2)));
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        double res = 0.0;

        for (int i = 1; i <= n; ++i) {
            // System.out.println(String.format("%d: %f", i, Math.log(k / (double)i) / Math.log(2)));
            res += (calc(k / (double)i) / n);
        }
        System.out.println(res);
    }
}
