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

public class Main {

    void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), k = sc.nextInt();

        int[] pow = new int[28];
        pow[0] = 1;
        for (int i = 1; i < 28; i++) {
            pow[i] = pow[i - 1] * 2;
        }

        double ans = 0;
        int x = 0;
        for (;k > pow[x]; x++) {}

        int cnt = 0;

        for (int i = 1; i <= n; i++) {
            if (k <= i) {
                ans += 1.0;
            } else {
                int c = (k + i - 1) / i;
                int t = 0;
                for (; c > pow[t]; t++) {}
                ans += (1.0 / pow[t]);
//                debug(1.0 / pow[t]);
            }
        }
        System.out.println(ans / n);
    }

    void debug(Object...os) {
        System.err.println(Arrays.deepToString(os));
    }

    public static void main(String[] args) {
        new Main().run();
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

    void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), k = sc.nextInt();

        int[] pow = new int[28];
        pow[0] = 1;
        for (int i = 1; i < 28; i++) {
            pow[i] = pow[i - 1] * 2;
        }

        double ans = 0;
        int x = 0;
        for (;k > pow[x]; x++) {}

        int cnt = 0;

        for (int i = 1; i <= n; i++) {
            if (k <= i) {
                ans += 1.0;
            } else {
                int c = (k + i - 1) / i;
                int t = 0;
                for (; c > pow[t]; t++) {}
                ans += (1.0 / pow[t]);
//                debug(1.0 / pow[t]);
            }
        }
        System.out.println(ans / n);
    }

    void debug(Object...os) {
        System.err.println(Arrays.deepToString(os));
    }

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

        int[] pow = new int[28];
        pow[0] = 1;
        for (int i = 1; i < 28; i++) {
            pow[i] = pow[i - 1] * 2;
        }

        double ans = 0;
        int x = 0;
        for (;k > pow[x]; x++) {}

        int cnt = 0;

        for (int i = 1; i <= n; i++) {
            if (k <= i) {
                ans += 1.0;
            } else {
                int c = (k + i - 1) / i;
                int t = 0;
                for (; c > pow[t]; t++) {}
                ans += (1.0 / pow[t]);
//                debug(1.0 / pow[t]);
            }
        }
        System.out.println(ans / n);
    } run {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), k = sc.nextInt();

        int[] pow = new int[28];
        pow[0] = 1;
        for (int i = 1; i < 28; i++) {
            pow[i] = pow[i - 1] * 2;
        }

        double ans = 0;
        int x = 0;
        for (;k > pow[x]; x++) {}

        int cnt = 0;

        for (int i = 1; i <= n; i++) {
            if (k <= i) {
                ans += 1.0;
            } else {
                int c = (k + i - 1) / i;
                int t = 0;
                for (; c > pow[t]; t++) {}
                ans += (1.0 / pow[t]);
//                debug(1.0 / pow[t]);
            }
        }
        System.out.println(ans / n);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt() n sc.nextInt() sc.nextInt sc k = sc.nextInt(); k sc.nextInt() sc.nextInt sc int[] pow = new int[28]; pow new int[28] 28 pow[0] = 1 pow[0] pow 0 1 for (int i = 1; i < 28; i++) {
            pow[i] = pow[i - 1] * 2;
        } int i = 1; int i = 1; i 1 i < 28 i 28 i++ i++ i {
            pow[i] = pow[i - 1] * 2;
        } {
            pow[i] = pow[i - 1] * 2;
        } pow[i] = pow[i - 1] * 2 pow[i] pow i pow[i - 1] * 2 pow[i - 1] pow i - 1 i 1 2 double ans = 0; ans 0 int x = 0; x 0 for (;k > pow[x]; x++) {} ; k > pow[x] k pow[x] pow x x++ x++ x {} {} int cnt = 0; cnt 0 for (int i = 1; i <= n; i++) {
            if (k <= i) {
                ans += 1.0;
            } else {
                int c = (k + i - 1) / i;
                int t = 0;
                for (; c > pow[t]; t++) {}
                ans += (1.0 / pow[t]);
//                debug(1.0 / pow[t]);
            }
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            if (k <= i) {
                ans += 1.0;
            } else {
                int c = (k + i - 1) / i;
                int t = 0;
                for (; c > pow[t]; t++) {}
                ans += (1.0 / pow[t]);
//                debug(1.0 / pow[t]);
            }
        } {
            if (k <= i) {
                ans += 1.0;
            } else {
                int c = (k + i - 1) / i;
                int t = 0;
                for (; c > pow[t]; t++) {}
                ans += (1.0 / pow[t]);
//                debug(1.0 / pow[t]);
            }
        } if (k <= i) {
                ans += 1.0;
            } else {
                int c = (k + i - 1) / i;
                int t = 0;
                for (; c > pow[t]; t++) {}
                ans += (1.0 / pow[t]);
//                debug(1.0 / pow[t]);
            } k <= i k i {
                ans += 1.0;
            } ans += 1.0 ans 1.0 {
                int c = (k + i - 1) / i;
                int t = 0;
                for (; c > pow[t]; t++) {}
                ans += (1.0 / pow[t]);
//                debug(1.0 / pow[t]);
            } int c = (k + i - 1) / i; c (k + i - 1) / i (k + i - 1) k + i k i 1 i int t = 0; t 0 for (; c > pow[t]; t++) {} ; c > pow[t] c pow[t] pow t t++ t++ t {} {} ans += (1.0 / pow[t]) ans (1.0 / pow[t]) 1.0 pow[t] pow t System.out.println(ans / n) System.out.println System.out System System.out ans / n ans n void debug(Object...os) {
        System.err.println(Arrays.deepToString(os));
    } debug {
        System.err.println(Arrays.deepToString(os));
    } System.err.println(Arrays.deepToString(os)) System.err.println System.err System System.err Arrays.deepToString(os) Arrays.deepToString Arrays os Object...os os public static void main(String[] args) {
        new Main().run();
    } main {
        new Main().run();
    } new Main().run() new Main().run new Main() String[] args args public class Main {

    void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), k = sc.nextInt();

        int[] pow = new int[28];
        pow[0] = 1;
        for (int i = 1; i < 28; i++) {
            pow[i] = pow[i - 1] * 2;
        }

        double ans = 0;
        int x = 0;
        for (;k > pow[x]; x++) {}

        int cnt = 0;

        for (int i = 1; i <= n; i++) {
            if (k <= i) {
                ans += 1.0;
            } else {
                int c = (k + i - 1) / i;
                int t = 0;
                for (; c > pow[t]; t++) {}
                ans += (1.0 / pow[t]);
//                debug(1.0 / pow[t]);
            }
        }
        System.out.println(ans / n);
    }

    void debug(Object...os) {
        System.err.println(Arrays.deepToString(os));
    }

    public static void main(String[] args) {
        new Main().run();
    }
} public class Main {

    void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), k = sc.nextInt();

        int[] pow = new int[28];
        pow[0] = 1;
        for (int i = 1; i < 28; i++) {
            pow[i] = pow[i - 1] * 2;
        }

        double ans = 0;
        int x = 0;
        for (;k > pow[x]; x++) {}

        int cnt = 0;

        for (int i = 1; i <= n; i++) {
            if (k <= i) {
                ans += 1.0;
            } else {
                int c = (k + i - 1) / i;
                int t = 0;
                for (; c > pow[t]; t++) {}
                ans += (1.0 / pow[t]);
//                debug(1.0 / pow[t]);
            }
        }
        System.out.println(ans / n);
    }

    void debug(Object...os) {
        System.err.println(Arrays.deepToString(os));
    }

    public static void main(String[] args) {
        new Main().run();
    }
} Main

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

public class Main {

    void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), k = sc.nextInt();

        int[] pow = new int[28];
        pow[0] = 1;
        for (int i = 1; i < 28; i++) {
            pow[i] = pow[i - 1] * 2;
        }

        double ans = 0;
        int x = 0;
        for (;k > pow[x]; x++) {}

        int cnt = 0;

        for (int i = 1; i <= n; i++) {
            if (k <= i) {
                ans += 1.0;
            } else {
                int c = (k + i - 1) / i;
                int t = 0;
                for (; c > pow[t]; t++) {}
                ans += (1.0 / pow[t]);
//                debug(1.0 / pow[t]);
            }
        }
        System.out.println(ans / n);
    }

    void debug(Object...os) {
        System.err.println(Arrays.deepToString(os));
    }

    public static void main(String[] args) {
        new Main().run();
    }
}
