
import java.util.Scanner;

// C - Dice and Coin
// https://atcoder.jp/contests/abc126/tasks/abc126_c
public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = Integer.parseInt(scanner.next());
        int K = Integer.parseInt(scanner.next());

        scanner.close();

        // 各値ごとに勝つ確率を出して確率をsumする
        double sum = 0;
        for (int dice = 1; dice <= N; dice++) {
            double tmp = 1.0d / N; // サイコロの各値が出る確率
            int point = dice;

            // K点を超えるまで
            while (point < K) {
                point *= 2;
                tmp /= 2;
            }
            sum += tmp;
        }

        System.out.println(sum);


    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = Integer.parseInt(scanner.next());
        int K = Integer.parseInt(scanner.next());

        scanner.close();

        // 各値ごとに勝つ確率を出して確率をsumする
        double sum = 0;
        for (int dice = 1; dice <= N; dice++) {
            double tmp = 1.0d / N; // サイコロの各値が出る確率
            int point = dice;

            // K点を超えるまで
            while (point < K) {
                point *= 2;
                tmp /= 2;
            }
            sum += tmp;
        }

        System.out.println(sum);


    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = Integer.parseInt(scanner.next());
        int K = Integer.parseInt(scanner.next());

        scanner.close();

        // 各値ごとに勝つ確率を出して確率をsumする
        double sum = 0;
        for (int dice = 1; dice <= N; dice++) {
            double tmp = 1.0d / N; // サイコロの各値が出る確率
            int point = dice;

            // K点を超えるまで
            while (point < K) {
                point *= 2;
                tmp /= 2;
            }
            sum += tmp;
        }

        System.out.println(sum);


    } main {
        Scanner scanner = new Scanner(System.in);
        int N = Integer.parseInt(scanner.next());
        int K = Integer.parseInt(scanner.next());

        scanner.close();

        // 各値ごとに勝つ確率を出して確率をsumする
        double sum = 0;
        for (int dice = 1; dice <= N; dice++) {
            double tmp = 1.0d / N; // サイコロの各値が出る確率
            int point = dice;

            // K点を超えるまで
            while (point < K) {
                point *= 2;
                tmp /= 2;
            }
            sum += tmp;
        }

        System.out.println(sum);


    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = Integer.parseInt(scanner.next()); N Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner int K = Integer.parseInt(scanner.next()); K Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner scanner.close() scanner.close scanner double sum = 0; sum 0 for (int dice = 1; dice <= N; dice++) {
            double tmp = 1.0d / N; // サイコロの各値が出る確率
            int point = dice;

            // K点を超えるまで
            while (point < K) {
                point *= 2;
                tmp /= 2;
            }
            sum += tmp;
        } int dice = 1; int dice = 1; dice 1 dice <= N dice N dice++ dice++ dice {
            double tmp = 1.0d / N; // サイコロの各値が出る確率
            int point = dice;

            // K点を超えるまで
            while (point < K) {
                point *= 2;
                tmp /= 2;
            }
            sum += tmp;
        } {
            double tmp = 1.0d / N; // サイコロの各値が出る確率
            int point = dice;

            // K点を超えるまで
            while (point < K) {
                point *= 2;
                tmp /= 2;
            }
            sum += tmp;
        } double tmp = 1.0d / N; tmp 1.0d / N 1.0d N int point = dice; point dice while (point < K) {
                point *= 2;
                tmp /= 2;
            } point < K point K {
                point *= 2;
                tmp /= 2;
            } point *= 2 point 2 tmp /= 2 tmp 2 sum += tmp sum tmp System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = Integer.parseInt(scanner.next());
        int K = Integer.parseInt(scanner.next());

        scanner.close();

        // 各値ごとに勝つ確率を出して確率をsumする
        double sum = 0;
        for (int dice = 1; dice <= N; dice++) {
            double tmp = 1.0d / N; // サイコロの各値が出る確率
            int point = dice;

            // K点を超えるまで
            while (point < K) {
                point *= 2;
                tmp /= 2;
            }
            sum += tmp;
        }

        System.out.println(sum);


    }
} public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = Integer.parseInt(scanner.next());
        int K = Integer.parseInt(scanner.next());

        scanner.close();

        // 各値ごとに勝つ確率を出して確率をsumする
        double sum = 0;
        for (int dice = 1; dice <= N; dice++) {
            double tmp = 1.0d / N; // サイコロの各値が出る確率
            int point = dice;

            // K点を超えるまで
            while (point < K) {
                point *= 2;
                tmp /= 2;
            }
            sum += tmp;
        }

        System.out.println(sum);


    }
} Main

import java.util.Scanner;

// C - Dice and Coin
// https://atcoder.jp/contests/abc126/tasks/abc126_c
public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = Integer.parseInt(scanner.next());
        int K = Integer.parseInt(scanner.next());

        scanner.close();

        // 各値ごとに勝つ確率を出して確率をsumする
        double sum = 0;
        for (int dice = 1; dice <= N; dice++) {
            double tmp = 1.0d / N; // サイコロの各値が出る確率
            int point = dice;

            // K点を超えるまで
            while (point < K) {
                point *= 2;
                tmp /= 2;
            }
            sum += tmp;
        }

        System.out.println(sum);


    }
}
