import java.util.Scanner;

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

        double per = 0.0;

        for (int i = 1; i <= N; i++) {
            int num = i;
            double tmpPer = 1.0 / N;
            while (num < K) {
                num *= 2;
                tmpPer = tmpPer / 2;
            }
            per += tmpPer;
        }
        System.out.println(per);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int N = Integer.parseInt(s.next());
        int K = Integer.parseInt(s.next());

        double per = 0.0;

        for (int i = 1; i <= N; i++) {
            int num = i;
            double tmpPer = 1.0 / N;
            while (num < K) {
                num *= 2;
                tmpPer = tmpPer / 2;
            }
            per += tmpPer;
        }
        System.out.println(per);
    }
} Main public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int N = Integer.parseInt(s.next());
        int K = Integer.parseInt(s.next());

        double per = 0.0;

        for (int i = 1; i <= N; i++) {
            int num = i;
            double tmpPer = 1.0 / N;
            while (num < K) {
                num *= 2;
                tmpPer = tmpPer / 2;
            }
            per += tmpPer;
        }
        System.out.println(per);
    } main {
        Scanner s = new Scanner(System.in);
        int N = Integer.parseInt(s.next());
        int K = Integer.parseInt(s.next());

        double per = 0.0;

        for (int i = 1; i <= N; i++) {
            int num = i;
            double tmpPer = 1.0 / N;
            while (num < K) {
                num *= 2;
                tmpPer = tmpPer / 2;
            }
            per += tmpPer;
        }
        System.out.println(per);
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int N = Integer.parseInt(s.next()); N Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s int K = Integer.parseInt(s.next()); K Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s double per = 0.0; per 0.0 for (int i = 1; i <= N; i++) {
            int num = i;
            double tmpPer = 1.0 / N;
            while (num < K) {
                num *= 2;
                tmpPer = tmpPer / 2;
            }
            per += tmpPer;
        } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
            int num = i;
            double tmpPer = 1.0 / N;
            while (num < K) {
                num *= 2;
                tmpPer = tmpPer / 2;
            }
            per += tmpPer;
        } {
            int num = i;
            double tmpPer = 1.0 / N;
            while (num < K) {
                num *= 2;
                tmpPer = tmpPer / 2;
            }
            per += tmpPer;
        } int num = i; num i double tmpPer = 1.0 / N; tmpPer 1.0 / N 1.0 N while (num < K) {
                num *= 2;
                tmpPer = tmpPer / 2;
            } num < K num K {
                num *= 2;
                tmpPer = tmpPer / 2;
            } num *= 2 num 2 tmpPer = tmpPer / 2 tmpPer tmpPer / 2 tmpPer 2 per += tmpPer per tmpPer System.out.println(per) System.out.println System.out System System.out per String[] args args public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int N = Integer.parseInt(s.next());
        int K = Integer.parseInt(s.next());

        double per = 0.0;

        for (int i = 1; i <= N; i++) {
            int num = i;
            double tmpPer = 1.0 / N;
            while (num < K) {
                num *= 2;
                tmpPer = tmpPer / 2;
            }
            per += tmpPer;
        }
        System.out.println(per);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int N = Integer.parseInt(s.next());
        int K = Integer.parseInt(s.next());

        double per = 0.0;

        for (int i = 1; i <= N; i++) {
            int num = i;
            double tmpPer = 1.0 / N;
            while (num < K) {
                num *= 2;
                tmpPer = tmpPer / 2;
            }
            per += tmpPer;
        }
        System.out.println(per);
    }
} Main
import java.util.Scanner;

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

        double per = 0.0;

        for (int i = 1; i <= N; i++) {
            int num = i;
            double tmpPer = 1.0 / N;
            while (num < K) {
                num *= 2;
                tmpPer = tmpPer / 2;
            }
            per += tmpPer;
        }
        System.out.println(per);
    }
}
