import java.util.Scanner;

public class Main {

    void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(); // サイコロの面の数
        int K = sc.nextInt(); // 目標点

        double sum = 0;
        for (int n = 1; n <= N; n++) {
            if (K/n == 0) {
                sum += 1;
                continue;
            }
            double count = Math.log((double)K/n) / Math.log(2);
            if (!isInteger(count)) {
                count = Math.floor(count) + 1;
            }
            sum += Math.pow((double)1/2, count);
        }
        System.out.print(sum/N);
    }

    // 整数かどうかを調べる。
    boolean isInteger (double number) {
        return (number == Math.floor(number));
    }

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

    void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(); // サイコロの面の数
        int K = sc.nextInt(); // 目標点

        double sum = 0;
        for (int n = 1; n <= N; n++) {
            if (K/n == 0) {
                sum += 1;
                continue;
            }
            double count = Math.log((double)K/n) / Math.log(2);
            if (!isInteger(count)) {
                count = Math.floor(count) + 1;
            }
            sum += Math.pow((double)1/2, count);
        }
        System.out.print(sum/N);
    }

    // 整数かどうかを調べる。
    boolean isInteger (double number) {
        return (number == Math.floor(number));
    }

    // Main
    public static void main(String[] args) {
        new Main().solve();
    }
} Main void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(); // サイコロの面の数
        int K = sc.nextInt(); // 目標点

        double sum = 0;
        for (int n = 1; n <= N; n++) {
            if (K/n == 0) {
                sum += 1;
                continue;
            }
            double count = Math.log((double)K/n) / Math.log(2);
            if (!isInteger(count)) {
                count = Math.floor(count) + 1;
            }
            sum += Math.pow((double)1/2, count);
        }
        System.out.print(sum/N);
    } solve {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(); // サイコロの面の数
        int K = sc.nextInt(); // 目標点

        double sum = 0;
        for (int n = 1; n <= N; n++) {
            if (K/n == 0) {
                sum += 1;
                continue;
            }
            double count = Math.log((double)K/n) / Math.log(2);
            if (!isInteger(count)) {
                count = Math.floor(count) + 1;
            }
            sum += Math.pow((double)1/2, count);
        }
        System.out.print(sum/N);
    } 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 sum = 0; sum 0 for (int n = 1; n <= N; n++) {
            if (K/n == 0) {
                sum += 1;
                continue;
            }
            double count = Math.log((double)K/n) / Math.log(2);
            if (!isInteger(count)) {
                count = Math.floor(count) + 1;
            }
            sum += Math.pow((double)1/2, count);
        } int n = 1; int n = 1; n 1 n <= N n N n++ n++ n {
            if (K/n == 0) {
                sum += 1;
                continue;
            }
            double count = Math.log((double)K/n) / Math.log(2);
            if (!isInteger(count)) {
                count = Math.floor(count) + 1;
            }
            sum += Math.pow((double)1/2, count);
        } {
            if (K/n == 0) {
                sum += 1;
                continue;
            }
            double count = Math.log((double)K/n) / Math.log(2);
            if (!isInteger(count)) {
                count = Math.floor(count) + 1;
            }
            sum += Math.pow((double)1/2, count);
        } if (K/n == 0) {
                sum += 1;
                continue;
            } K/n == 0 K/n K n 0 {
                sum += 1;
                continue;
            } sum += 1 sum 1 continue; double count = Math.log((double)K/n) / Math.log(2); count Math.log((double)K/n) / Math.log(2) Math.log((double)K/n) Math.log Math (double)K/n (double)K n Math.log(2) Math.log Math 2 if (!isInteger(count)) {
                count = Math.floor(count) + 1;
            } !isInteger(count) isInteger(count) isInteger count {
                count = Math.floor(count) + 1;
            } count = Math.floor(count) + 1 count Math.floor(count) + 1 Math.floor(count) Math.floor Math count 1 sum += Math.pow((double)1/2, count) sum Math.pow((double)1/2, count) Math.pow Math (double)1/2 (double)1 2 count System.out.print(sum/N) System.out.print System.out System System.out sum/N sum N // 整数かどうかを調べる。
    boolean isInteger (double number) {
        return (number == Math.floor(number));
    } isInteger {
        return (number == Math.floor(number));
    } return (number == Math.floor(number)); (number == Math.floor(number)) number Math.floor(number) Math.floor Math number double number number // Main
    public static void main(String[] args) {
        new Main().solve();
    } main {
        new Main().solve();
    } new Main().solve() new Main().solve new Main() String[] args args public class Main {

    void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(); // サイコロの面の数
        int K = sc.nextInt(); // 目標点

        double sum = 0;
        for (int n = 1; n <= N; n++) {
            if (K/n == 0) {
                sum += 1;
                continue;
            }
            double count = Math.log((double)K/n) / Math.log(2);
            if (!isInteger(count)) {
                count = Math.floor(count) + 1;
            }
            sum += Math.pow((double)1/2, count);
        }
        System.out.print(sum/N);
    }

    // 整数かどうかを調べる。
    boolean isInteger (double number) {
        return (number == Math.floor(number));
    }

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

    void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(); // サイコロの面の数
        int K = sc.nextInt(); // 目標点

        double sum = 0;
        for (int n = 1; n <= N; n++) {
            if (K/n == 0) {
                sum += 1;
                continue;
            }
            double count = Math.log((double)K/n) / Math.log(2);
            if (!isInteger(count)) {
                count = Math.floor(count) + 1;
            }
            sum += Math.pow((double)1/2, count);
        }
        System.out.print(sum/N);
    }

    // 整数かどうかを調べる。
    boolean isInteger (double number) {
        return (number == Math.floor(number));
    }

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

public class Main {

    void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(); // サイコロの面の数
        int K = sc.nextInt(); // 目標点

        double sum = 0;
        for (int n = 1; n <= N; n++) {
            if (K/n == 0) {
                sum += 1;
                continue;
            }
            double count = Math.log((double)K/n) / Math.log(2);
            if (!isInteger(count)) {
                count = Math.floor(count) + 1;
            }
            sum += Math.pow((double)1/2, count);
        }
        System.out.print(sum/N);
    }

    // 整数かどうかを調べる。
    boolean isInteger (double number) {
        return (number == Math.floor(number));
    }

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