import java.util.Scanner;

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

        double rate = 0;
        for (int i = 0; i < N; i++) {
            int point = i + 1;
            if (point >= K) {
                rate += 1 / (double) N;
                continue;
            }

            double v = K /(double) point;
            double count = Math.log10(v) / Math.log10(2);
            int c = (int)Math.ceil(count);
            double result = 1 / (double) N * Math.pow(0.5, c);
            rate += result;
        }

        System.out.println(rate);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner std = new Scanner(System.in);
        int N = std.nextInt();
        int K = std.nextInt();

        double rate = 0;
        for (int i = 0; i < N; i++) {
            int point = i + 1;
            if (point >= K) {
                rate += 1 / (double) N;
                continue;
            }

            double v = K /(double) point;
            double count = Math.log10(v) / Math.log10(2);
            int c = (int)Math.ceil(count);
            double result = 1 / (double) N * Math.pow(0.5, c);
            rate += result;
        }

        System.out.println(rate);
    }
} Main public static void main(String[] args) {
        Scanner std = new Scanner(System.in);
        int N = std.nextInt();
        int K = std.nextInt();

        double rate = 0;
        for (int i = 0; i < N; i++) {
            int point = i + 1;
            if (point >= K) {
                rate += 1 / (double) N;
                continue;
            }

            double v = K /(double) point;
            double count = Math.log10(v) / Math.log10(2);
            int c = (int)Math.ceil(count);
            double result = 1 / (double) N * Math.pow(0.5, c);
            rate += result;
        }

        System.out.println(rate);
    } main {
        Scanner std = new Scanner(System.in);
        int N = std.nextInt();
        int K = std.nextInt();

        double rate = 0;
        for (int i = 0; i < N; i++) {
            int point = i + 1;
            if (point >= K) {
                rate += 1 / (double) N;
                continue;
            }

            double v = K /(double) point;
            double count = Math.log10(v) / Math.log10(2);
            int c = (int)Math.ceil(count);
            double result = 1 / (double) N * Math.pow(0.5, c);
            rate += result;
        }

        System.out.println(rate);
    } Scanner std = new Scanner(System.in); std new Scanner(System.in) int N = std.nextInt(); N std.nextInt() std.nextInt std int K = std.nextInt(); K std.nextInt() std.nextInt std double rate = 0; rate 0 for (int i = 0; i < N; i++) {
            int point = i + 1;
            if (point >= K) {
                rate += 1 / (double) N;
                continue;
            }

            double v = K /(double) point;
            double count = Math.log10(v) / Math.log10(2);
            int c = (int)Math.ceil(count);
            double result = 1 / (double) N * Math.pow(0.5, c);
            rate += result;
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int point = i + 1;
            if (point >= K) {
                rate += 1 / (double) N;
                continue;
            }

            double v = K /(double) point;
            double count = Math.log10(v) / Math.log10(2);
            int c = (int)Math.ceil(count);
            double result = 1 / (double) N * Math.pow(0.5, c);
            rate += result;
        } {
            int point = i + 1;
            if (point >= K) {
                rate += 1 / (double) N;
                continue;
            }

            double v = K /(double) point;
            double count = Math.log10(v) / Math.log10(2);
            int c = (int)Math.ceil(count);
            double result = 1 / (double) N * Math.pow(0.5, c);
            rate += result;
        } int point = i + 1; point i + 1 i 1 if (point >= K) {
                rate += 1 / (double) N;
                continue;
            } point >= K point K {
                rate += 1 / (double) N;
                continue;
            } rate += 1 / (double) N rate 1 / (double) N 1 (double) N continue; double v = K /(double) point; v K /(double) point K (double) point double count = Math.log10(v) / Math.log10(2); count Math.log10(v) / Math.log10(2) Math.log10(v) Math.log10 Math v Math.log10(2) Math.log10 Math 2 int c = (int)Math.ceil(count); c (int)Math.ceil(count) Math.ceil Math count double result = 1 / (double) N * Math.pow(0.5, c); result 1 / (double) N * Math.pow(0.5, c) 1 / (double) N 1 (double) N Math.pow(0.5, c) Math.pow Math 0.5 c rate += result rate result System.out.println(rate) System.out.println System.out System System.out rate String[] args args public class Main {
    public static void main(String[] args) {
        Scanner std = new Scanner(System.in);
        int N = std.nextInt();
        int K = std.nextInt();

        double rate = 0;
        for (int i = 0; i < N; i++) {
            int point = i + 1;
            if (point >= K) {
                rate += 1 / (double) N;
                continue;
            }

            double v = K /(double) point;
            double count = Math.log10(v) / Math.log10(2);
            int c = (int)Math.ceil(count);
            double result = 1 / (double) N * Math.pow(0.5, c);
            rate += result;
        }

        System.out.println(rate);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner std = new Scanner(System.in);
        int N = std.nextInt();
        int K = std.nextInt();

        double rate = 0;
        for (int i = 0; i < N; i++) {
            int point = i + 1;
            if (point >= K) {
                rate += 1 / (double) N;
                continue;
            }

            double v = K /(double) point;
            double count = Math.log10(v) / Math.log10(2);
            int c = (int)Math.ceil(count);
            double result = 1 / (double) N * Math.pow(0.5, c);
            rate += result;
        }

        System.out.println(rate);
    }
} Main
import java.util.Scanner;

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

        double rate = 0;
        for (int i = 0; i < N; i++) {
            int point = i + 1;
            if (point >= K) {
                rate += 1 / (double) N;
                continue;
            }

            double v = K /(double) point;
            double count = Math.log10(v) / Math.log10(2);
            int c = (int)Math.ceil(count);
            double result = 1 / (double) N * Math.pow(0.5, c);
            rate += result;
        }

        System.out.println(rate);
    }
}
