import java.util.*;
public class Main {
    public static void main(String[] args) throws NumberFormatException {
        Scanner sc = new Scanner(System.in);

        String S = sc.nextLine().trim();
        String[] segments = S.split(" ");
        int N = Integer.parseInt(segments[0]);
        int K = Integer.parseInt(segments[1]);

        double result = 0;
        double np = (double)1.0 / N;
        for (int i = 1; i <= N; i++) {
            result += np * calcP(i, K);
        }
        System.out.println(result);
    }

    private static double calcP(int n, int k) {
        int score = n;
        int cnt = 0;
        while (score < k) {
            cnt++;
            score *= 2;
        }

        if (cnt > 0) {
            return Math.pow((double)0.5, cnt);
        } else {
            return 1;
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws NumberFormatException {
        Scanner sc = new Scanner(System.in);

        String S = sc.nextLine().trim();
        String[] segments = S.split(" ");
        int N = Integer.parseInt(segments[0]);
        int K = Integer.parseInt(segments[1]);

        double result = 0;
        double np = (double)1.0 / N;
        for (int i = 1; i <= N; i++) {
            result += np * calcP(i, K);
        }
        System.out.println(result);
    }

    private static double calcP(int n, int k) {
        int score = n;
        int cnt = 0;
        while (score < k) {
            cnt++;
            score *= 2;
        }

        if (cnt > 0) {
            return Math.pow((double)0.5, cnt);
        } else {
            return 1;
        }
    }
} Main public static void main(String[] args) throws NumberFormatException {
        Scanner sc = new Scanner(System.in);

        String S = sc.nextLine().trim();
        String[] segments = S.split(" ");
        int N = Integer.parseInt(segments[0]);
        int K = Integer.parseInt(segments[1]);

        double result = 0;
        double np = (double)1.0 / N;
        for (int i = 1; i <= N; i++) {
            result += np * calcP(i, K);
        }
        System.out.println(result);
    } main {
        Scanner sc = new Scanner(System.in);

        String S = sc.nextLine().trim();
        String[] segments = S.split(" ");
        int N = Integer.parseInt(segments[0]);
        int K = Integer.parseInt(segments[1]);

        double result = 0;
        double np = (double)1.0 / N;
        for (int i = 1; i <= N; i++) {
            result += np * calcP(i, K);
        }
        System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.nextLine().trim(); S sc.nextLine().trim() sc.nextLine().trim sc.nextLine() sc.nextLine sc String[] segments = S.split(" "); segments S.split(" ") S.split S " " int N = Integer.parseInt(segments[0]); N Integer.parseInt(segments[0]) Integer.parseInt Integer segments[0] segments 0 int K = Integer.parseInt(segments[1]); K Integer.parseInt(segments[1]) Integer.parseInt Integer segments[1] segments 1 double result = 0; result 0 double np = (double)1.0 / N; np (double)1.0 / N (double)1.0 N for (int i = 1; i <= N; i++) {
            result += np * calcP(i, K);
        } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
            result += np * calcP(i, K);
        } {
            result += np * calcP(i, K);
        } result += np * calcP(i, K) result np * calcP(i, K) np calcP(i, K) calcP i K System.out.println(result) System.out.println System.out System System.out result String[] args args private static double calcP(int n, int k) {
        int score = n;
        int cnt = 0;
        while (score < k) {
            cnt++;
            score *= 2;
        }

        if (cnt > 0) {
            return Math.pow((double)0.5, cnt);
        } else {
            return 1;
        }
    } calcP {
        int score = n;
        int cnt = 0;
        while (score < k) {
            cnt++;
            score *= 2;
        }

        if (cnt > 0) {
            return Math.pow((double)0.5, cnt);
        } else {
            return 1;
        }
    } int score = n; score n int cnt = 0; cnt 0 while (score < k) {
            cnt++;
            score *= 2;
        } score < k score k {
            cnt++;
            score *= 2;
        } cnt++ cnt score *= 2 score 2 if (cnt > 0) {
            return Math.pow((double)0.5, cnt);
        } else {
            return 1;
        } cnt > 0 cnt 0 {
            return Math.pow((double)0.5, cnt);
        } return Math.pow((double)0.5, cnt); Math.pow((double)0.5, cnt) Math.pow Math (double)0.5 cnt {
            return 1;
        } return 1; 1 int n n int k k public class Main {
    public static void main(String[] args) throws NumberFormatException {
        Scanner sc = new Scanner(System.in);

        String S = sc.nextLine().trim();
        String[] segments = S.split(" ");
        int N = Integer.parseInt(segments[0]);
        int K = Integer.parseInt(segments[1]);

        double result = 0;
        double np = (double)1.0 / N;
        for (int i = 1; i <= N; i++) {
            result += np * calcP(i, K);
        }
        System.out.println(result);
    }

    private static double calcP(int n, int k) {
        int score = n;
        int cnt = 0;
        while (score < k) {
            cnt++;
            score *= 2;
        }

        if (cnt > 0) {
            return Math.pow((double)0.5, cnt);
        } else {
            return 1;
        }
    }
} public class Main {
    public static void main(String[] args) throws NumberFormatException {
        Scanner sc = new Scanner(System.in);

        String S = sc.nextLine().trim();
        String[] segments = S.split(" ");
        int N = Integer.parseInt(segments[0]);
        int K = Integer.parseInt(segments[1]);

        double result = 0;
        double np = (double)1.0 / N;
        for (int i = 1; i <= N; i++) {
            result += np * calcP(i, K);
        }
        System.out.println(result);
    }

    private static double calcP(int n, int k) {
        int score = n;
        int cnt = 0;
        while (score < k) {
            cnt++;
            score *= 2;
        }

        if (cnt > 0) {
            return Math.pow((double)0.5, cnt);
        } else {
            return 1;
        }
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args) throws NumberFormatException {
        Scanner sc = new Scanner(System.in);

        String S = sc.nextLine().trim();
        String[] segments = S.split(" ");
        int N = Integer.parseInt(segments[0]);
        int K = Integer.parseInt(segments[1]);

        double result = 0;
        double np = (double)1.0 / N;
        for (int i = 1; i <= N; i++) {
            result += np * calcP(i, K);
        }
        System.out.println(result);
    }

    private static double calcP(int n, int k) {
        int score = n;
        int cnt = 0;
        while (score < k) {
            cnt++;
            score *= 2;
        }

        if (cnt > 0) {
            return Math.pow((double)0.5, cnt);
        } else {
            return 1;
        }
    }
}
