import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();

        double ans = 0;
        for (int i = 1; i <= n; i++) {
            int m = 1;
            int nn = i;
            while(nn < k) {
                nn *= 2;
                m *= 2;
            }
            ans += 1.0 / m;
        }

        ans /= n;
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();

        double ans = 0;
        for (int i = 1; i <= n; i++) {
            int m = 1;
            int nn = i;
            while(nn < k) {
                nn *= 2;
                m *= 2;
            }
            ans += 1.0 / m;
        }

        ans /= n;
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();

        double ans = 0;
        for (int i = 1; i <= n; i++) {
            int m = 1;
            int nn = i;
            while(nn < k) {
                nn *= 2;
                m *= 2;
            }
            ans += 1.0 / m;
        }

        ans /= n;
        System.out.println(ans);
    } main {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();

        double ans = 0;
        for (int i = 1; i <= n; i++) {
            int m = 1;
            int nn = i;
            while(nn < k) {
                nn *= 2;
                m *= 2;
            }
            ans += 1.0 / m;
        }

        ans /= n;
        System.out.println(ans);
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt(); n in.nextInt() in.nextInt in int k = in.nextInt(); k in.nextInt() in.nextInt in double ans = 0; ans 0 for (int i = 1; i <= n; i++) {
            int m = 1;
            int nn = i;
            while(nn < k) {
                nn *= 2;
                m *= 2;
            }
            ans += 1.0 / m;
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            int m = 1;
            int nn = i;
            while(nn < k) {
                nn *= 2;
                m *= 2;
            }
            ans += 1.0 / m;
        } {
            int m = 1;
            int nn = i;
            while(nn < k) {
                nn *= 2;
                m *= 2;
            }
            ans += 1.0 / m;
        } int m = 1; m 1 int nn = i; nn i while(nn < k) {
                nn *= 2;
                m *= 2;
            } nn < k nn k {
                nn *= 2;
                m *= 2;
            } nn *= 2 nn 2 m *= 2 m 2 ans += 1.0 / m ans 1.0 / m 1.0 m ans /= n ans n 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 in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();

        double ans = 0;
        for (int i = 1; i <= n; i++) {
            int m = 1;
            int nn = i;
            while(nn < k) {
                nn *= 2;
                m *= 2;
            }
            ans += 1.0 / m;
        }

        ans /= n;
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();

        double ans = 0;
        for (int i = 1; i <= n; i++) {
            int m = 1;
            int nn = i;
            while(nn < k) {
                nn *= 2;
                m *= 2;
            }
            ans += 1.0 / m;
        }

        ans /= n;
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();

        double ans = 0;
        for (int i = 1; i <= n; i++) {
            int m = 1;
            int nn = i;
            while(nn < k) {
                nn *= 2;
                m *= 2;
            }
            ans += 1.0 / m;
        }

        ans /= n;
        System.out.println(ans);
    }
}