import java.util.*;

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

        double allProb = 0.0000000;

        double baseProb = 1.00000 / (double) N;
        int remainVals = 0;

        for (int i = 1; i <= N; i++) {
            int takeCoins = getNeedTakeCoins(Double.parseDouble(String.valueOf(i)), K);
            if (takeCoins == 0) {
                remainVals = N - i + 1;
                break;
            }
            allProb += baseProb * Math.pow(0.5000, takeCoins);
        }

        if (remainVals > 0) {
            allProb += baseProb * remainVals;
        }

        System.out.println(allProb);

    }

    public static int getNeedTakeCoins(double val, double K) {
        int ret = 0;
        boolean times = false;
        while (true) {
            if (val >= K) {
                break;
            }
            val *= 4;
            ret += 2.00;
            times = true;
        }
        if (val / 2.00 >= K && times) {
            ret -= 1;
        }
        return ret;
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        sc.close();

        double allProb = 0.0000000;

        double baseProb = 1.00000 / (double) N;
        int remainVals = 0;

        for (int i = 1; i <= N; i++) {
            int takeCoins = getNeedTakeCoins(Double.parseDouble(String.valueOf(i)), K);
            if (takeCoins == 0) {
                remainVals = N - i + 1;
                break;
            }
            allProb += baseProb * Math.pow(0.5000, takeCoins);
        }

        if (remainVals > 0) {
            allProb += baseProb * remainVals;
        }

        System.out.println(allProb);

    }

    public static int getNeedTakeCoins(double val, double K) {
        int ret = 0;
        boolean times = false;
        while (true) {
            if (val >= K) {
                break;
            }
            val *= 4;
            ret += 2.00;
            times = true;
        }
        if (val / 2.00 >= K && times) {
            ret -= 1;
        }
        return ret;
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        sc.close();

        double allProb = 0.0000000;

        double baseProb = 1.00000 / (double) N;
        int remainVals = 0;

        for (int i = 1; i <= N; i++) {
            int takeCoins = getNeedTakeCoins(Double.parseDouble(String.valueOf(i)), K);
            if (takeCoins == 0) {
                remainVals = N - i + 1;
                break;
            }
            allProb += baseProb * Math.pow(0.5000, takeCoins);
        }

        if (remainVals > 0) {
            allProb += baseProb * remainVals;
        }

        System.out.println(allProb);

    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        sc.close();

        double allProb = 0.0000000;

        double baseProb = 1.00000 / (double) N;
        int remainVals = 0;

        for (int i = 1; i <= N; i++) {
            int takeCoins = getNeedTakeCoins(Double.parseDouble(String.valueOf(i)), K);
            if (takeCoins == 0) {
                remainVals = N - i + 1;
                break;
            }
            allProb += baseProb * Math.pow(0.5000, takeCoins);
        }

        if (remainVals > 0) {
            allProb += baseProb * remainVals;
        }

        System.out.println(allProb);

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int K = sc.nextInt(); K sc.nextInt() sc.nextInt sc sc.close() sc.close sc double allProb = 0.0000000; allProb 0.0000000 double baseProb = 1.00000 / (double) N; baseProb 1.00000 / (double) N 1.00000 (double) N int remainVals = 0; remainVals 0 for (int i = 1; i <= N; i++) {
            int takeCoins = getNeedTakeCoins(Double.parseDouble(String.valueOf(i)), K);
            if (takeCoins == 0) {
                remainVals = N - i + 1;
                break;
            }
            allProb += baseProb * Math.pow(0.5000, takeCoins);
        } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
            int takeCoins = getNeedTakeCoins(Double.parseDouble(String.valueOf(i)), K);
            if (takeCoins == 0) {
                remainVals = N - i + 1;
                break;
            }
            allProb += baseProb * Math.pow(0.5000, takeCoins);
        } {
            int takeCoins = getNeedTakeCoins(Double.parseDouble(String.valueOf(i)), K);
            if (takeCoins == 0) {
                remainVals = N - i + 1;
                break;
            }
            allProb += baseProb * Math.pow(0.5000, takeCoins);
        } int takeCoins = getNeedTakeCoins(Double.parseDouble(String.valueOf(i)), K); takeCoins getNeedTakeCoins(Double.parseDouble(String.valueOf(i)), K) getNeedTakeCoins Double.parseDouble(String.valueOf(i)) Double.parseDouble Double String.valueOf(i) String.valueOf String i K if (takeCoins == 0) {
                remainVals = N - i + 1;
                break;
            } takeCoins == 0 takeCoins 0 {
                remainVals = N - i + 1;
                break;
            } remainVals = N - i + 1 remainVals N - i + 1 N - i N i 1 break; allProb += baseProb * Math.pow(0.5000, takeCoins) allProb baseProb * Math.pow(0.5000, takeCoins) baseProb Math.pow(0.5000, takeCoins) Math.pow Math 0.5000 takeCoins if (remainVals > 0) {
            allProb += baseProb * remainVals;
        } remainVals > 0 remainVals 0 {
            allProb += baseProb * remainVals;
        } allProb += baseProb * remainVals allProb baseProb * remainVals baseProb remainVals System.out.println(allProb) System.out.println System.out System System.out allProb String[] args args public static int getNeedTakeCoins(double val, double K) {
        int ret = 0;
        boolean times = false;
        while (true) {
            if (val >= K) {
                break;
            }
            val *= 4;
            ret += 2.00;
            times = true;
        }
        if (val / 2.00 >= K && times) {
            ret -= 1;
        }
        return ret;
    } getNeedTakeCoins {
        int ret = 0;
        boolean times = false;
        while (true) {
            if (val >= K) {
                break;
            }
            val *= 4;
            ret += 2.00;
            times = true;
        }
        if (val / 2.00 >= K && times) {
            ret -= 1;
        }
        return ret;
    } int ret = 0; ret 0 boolean times = false; times false while (true) {
            if (val >= K) {
                break;
            }
            val *= 4;
            ret += 2.00;
            times = true;
        } true {
            if (val >= K) {
                break;
            }
            val *= 4;
            ret += 2.00;
            times = true;
        } if (val >= K) {
                break;
            } val >= K val K {
                break;
            } break; val *= 4 val 4 ret += 2.00 ret 2.00 times = true times true if (val / 2.00 >= K && times) {
            ret -= 1;
        } val / 2.00 >= K && times val / 2.00 >= K val / 2.00 val 2.00 K times {
            ret -= 1;
        } ret -= 1 ret 1 return ret; ret double val val double K K public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        sc.close();

        double allProb = 0.0000000;

        double baseProb = 1.00000 / (double) N;
        int remainVals = 0;

        for (int i = 1; i <= N; i++) {
            int takeCoins = getNeedTakeCoins(Double.parseDouble(String.valueOf(i)), K);
            if (takeCoins == 0) {
                remainVals = N - i + 1;
                break;
            }
            allProb += baseProb * Math.pow(0.5000, takeCoins);
        }

        if (remainVals > 0) {
            allProb += baseProb * remainVals;
        }

        System.out.println(allProb);

    }

    public static int getNeedTakeCoins(double val, double K) {
        int ret = 0;
        boolean times = false;
        while (true) {
            if (val >= K) {
                break;
            }
            val *= 4;
            ret += 2.00;
            times = true;
        }
        if (val / 2.00 >= K && times) {
            ret -= 1;
        }
        return ret;
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        sc.close();

        double allProb = 0.0000000;

        double baseProb = 1.00000 / (double) N;
        int remainVals = 0;

        for (int i = 1; i <= N; i++) {
            int takeCoins = getNeedTakeCoins(Double.parseDouble(String.valueOf(i)), K);
            if (takeCoins == 0) {
                remainVals = N - i + 1;
                break;
            }
            allProb += baseProb * Math.pow(0.5000, takeCoins);
        }

        if (remainVals > 0) {
            allProb += baseProb * remainVals;
        }

        System.out.println(allProb);

    }

    public static int getNeedTakeCoins(double val, double K) {
        int ret = 0;
        boolean times = false;
        while (true) {
            if (val >= K) {
                break;
            }
            val *= 4;
            ret += 2.00;
            times = true;
        }
        if (val / 2.00 >= K && times) {
            ret -= 1;
        }
        return ret;
    }
} Main
import java.util.*;

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

        double allProb = 0.0000000;

        double baseProb = 1.00000 / (double) N;
        int remainVals = 0;

        for (int i = 1; i <= N; i++) {
            int takeCoins = getNeedTakeCoins(Double.parseDouble(String.valueOf(i)), K);
            if (takeCoins == 0) {
                remainVals = N - i + 1;
                break;
            }
            allProb += baseProb * Math.pow(0.5000, takeCoins);
        }

        if (remainVals > 0) {
            allProb += baseProb * remainVals;
        }

        System.out.println(allProb);

    }

    public static int getNeedTakeCoins(double val, double K) {
        int ret = 0;
        boolean times = false;
        while (true) {
            if (val >= K) {
                break;
            }
            val *= 4;
            ret += 2.00;
            times = true;
        }
        if (val / 2.00 >= K && times) {
            ret -= 1;
        }
        return ret;
    }
}
