
import java.util.*;

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

        show(calc(N, K));
    }

    private static double calc(int N, int K) {
        double answer = 0;

        for (int i = 1; i <= N; i++) {
            double prob = 1d / N;
            int now = i;

            while (now < K) {
                now = now * 2;
                prob = prob * 0.5;
            }
            answer = answer + prob;
        }

        return answer;
    }

    private static void show(double answer) {
        System.out.println(answer);
    }

    private static int nextInt(Scanner sc) {
        return Integer.parseInt(sc.next());
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        // main
        Scanner sc = new Scanner(System.in);
        int N = nextInt(sc);
        int K = nextInt(sc);

        show(calc(N, K));
    }

    private static double calc(int N, int K) {
        double answer = 0;

        for (int i = 1; i <= N; i++) {
            double prob = 1d / N;
            int now = i;

            while (now < K) {
                now = now * 2;
                prob = prob * 0.5;
            }
            answer = answer + prob;
        }

        return answer;
    }

    private static void show(double answer) {
        System.out.println(answer);
    }

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

        show(calc(N, K));
    } main {
        // main
        Scanner sc = new Scanner(System.in);
        int N = nextInt(sc);
        int K = nextInt(sc);

        show(calc(N, K));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = nextInt(sc); N nextInt(sc) nextInt sc int K = nextInt(sc); K nextInt(sc) nextInt sc show(calc(N, K)) show calc(N, K) calc N K String[] args args private static double calc(int N, int K) {
        double answer = 0;

        for (int i = 1; i <= N; i++) {
            double prob = 1d / N;
            int now = i;

            while (now < K) {
                now = now * 2;
                prob = prob * 0.5;
            }
            answer = answer + prob;
        }

        return answer;
    } calc {
        double answer = 0;

        for (int i = 1; i <= N; i++) {
            double prob = 1d / N;
            int now = i;

            while (now < K) {
                now = now * 2;
                prob = prob * 0.5;
            }
            answer = answer + prob;
        }

        return answer;
    } double answer = 0; answer 0 for (int i = 1; i <= N; i++) {
            double prob = 1d / N;
            int now = i;

            while (now < K) {
                now = now * 2;
                prob = prob * 0.5;
            }
            answer = answer + prob;
        } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
            double prob = 1d / N;
            int now = i;

            while (now < K) {
                now = now * 2;
                prob = prob * 0.5;
            }
            answer = answer + prob;
        } {
            double prob = 1d / N;
            int now = i;

            while (now < K) {
                now = now * 2;
                prob = prob * 0.5;
            }
            answer = answer + prob;
        } double prob = 1d / N; prob 1d / N 1d N int now = i; now i while (now < K) {
                now = now * 2;
                prob = prob * 0.5;
            } now < K now K {
                now = now * 2;
                prob = prob * 0.5;
            } now = now * 2 now now * 2 now 2 prob = prob * 0.5 prob prob * 0.5 prob 0.5 answer = answer + prob answer answer + prob answer prob return answer; answer int N N int K K private static void show(double answer) {
        System.out.println(answer);
    } show {
        System.out.println(answer);
    } System.out.println(answer) System.out.println System.out System System.out answer double answer answer private static int nextInt(Scanner sc) {
        return Integer.parseInt(sc.next());
    } nextInt {
        return Integer.parseInt(sc.next());
    } return Integer.parseInt(sc.next()); Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc Scanner sc sc public class Main {
    public static void main(String[] args) {
        // main
        Scanner sc = new Scanner(System.in);
        int N = nextInt(sc);
        int K = nextInt(sc);

        show(calc(N, K));
    }

    private static double calc(int N, int K) {
        double answer = 0;

        for (int i = 1; i <= N; i++) {
            double prob = 1d / N;
            int now = i;

            while (now < K) {
                now = now * 2;
                prob = prob * 0.5;
            }
            answer = answer + prob;
        }

        return answer;
    }

    private static void show(double answer) {
        System.out.println(answer);
    }

    private static int nextInt(Scanner sc) {
        return Integer.parseInt(sc.next());
    }
} public class Main {
    public static void main(String[] args) {
        // main
        Scanner sc = new Scanner(System.in);
        int N = nextInt(sc);
        int K = nextInt(sc);

        show(calc(N, K));
    }

    private static double calc(int N, int K) {
        double answer = 0;

        for (int i = 1; i <= N; i++) {
            double prob = 1d / N;
            int now = i;

            while (now < K) {
                now = now * 2;
                prob = prob * 0.5;
            }
            answer = answer + prob;
        }

        return answer;
    }

    private static void show(double answer) {
        System.out.println(answer);
    }

    private static int nextInt(Scanner sc) {
        return Integer.parseInt(sc.next());
    }
} Main

import java.util.*;

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

        show(calc(N, K));
    }

    private static double calc(int N, int K) {
        double answer = 0;

        for (int i = 1; i <= N; i++) {
            double prob = 1d / N;
            int now = i;

            while (now < K) {
                now = now * 2;
                prob = prob * 0.5;
            }
            answer = answer + prob;
        }

        return answer;
    }

    private static void show(double answer) {
        System.out.println(answer);
    }

    private static int nextInt(Scanner sc) {
        return Integer.parseInt(sc.next());
    }
}
