import java.util.*;
import java.lang.String;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int point = 0;
        double probability = 0.0f;

        for (int i = 1; i <= n; i++) {
            point = i;// ポイントの初期値設定
            double tmpProbability = 1.0/n;

            if (point >= k) {
                probability += tmpProbability;
                continue;
            }

            int j = 1;
            while (point < k) {
                point *= 2;
                if (point >= k) {
                    tmpProbability *= Math.pow(0.5, (double)j);
                    probability += tmpProbability;
                    break;
                }
                j++;
            }
        }

        System.out.println(probability);
    }
} import java.util.*; util.* java import java.lang.String; String java.lang public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int point = 0;
        double probability = 0.0f;

        for (int i = 1; i <= n; i++) {
            point = i;// ポイントの初期値設定
            double tmpProbability = 1.0/n;

            if (point >= k) {
                probability += tmpProbability;
                continue;
            }

            int j = 1;
            while (point < k) {
                point *= 2;
                if (point >= k) {
                    tmpProbability *= Math.pow(0.5, (double)j);
                    probability += tmpProbability;
                    break;
                }
                j++;
            }
        }

        System.out.println(probability);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int point = 0;
        double probability = 0.0f;

        for (int i = 1; i <= n; i++) {
            point = i;// ポイントの初期値設定
            double tmpProbability = 1.0/n;

            if (point >= k) {
                probability += tmpProbability;
                continue;
            }

            int j = 1;
            while (point < k) {
                point *= 2;
                if (point >= k) {
                    tmpProbability *= Math.pow(0.5, (double)j);
                    probability += tmpProbability;
                    break;
                }
                j++;
            }
        }

        System.out.println(probability);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int point = 0;
        double probability = 0.0f;

        for (int i = 1; i <= n; i++) {
            point = i;// ポイントの初期値設定
            double tmpProbability = 1.0/n;

            if (point >= k) {
                probability += tmpProbability;
                continue;
            }

            int j = 1;
            while (point < k) {
                point *= 2;
                if (point >= k) {
                    tmpProbability *= Math.pow(0.5, (double)j);
                    probability += tmpProbability;
                    break;
                }
                j++;
            }
        }

        System.out.println(probability);
    } 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 int point = 0; point 0 double probability = 0.0f; probability 0.0f for (int i = 1; i <= n; i++) {
            point = i;// ポイントの初期値設定
            double tmpProbability = 1.0/n;

            if (point >= k) {
                probability += tmpProbability;
                continue;
            }

            int j = 1;
            while (point < k) {
                point *= 2;
                if (point >= k) {
                    tmpProbability *= Math.pow(0.5, (double)j);
                    probability += tmpProbability;
                    break;
                }
                j++;
            }
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            point = i;// ポイントの初期値設定
            double tmpProbability = 1.0/n;

            if (point >= k) {
                probability += tmpProbability;
                continue;
            }

            int j = 1;
            while (point < k) {
                point *= 2;
                if (point >= k) {
                    tmpProbability *= Math.pow(0.5, (double)j);
                    probability += tmpProbability;
                    break;
                }
                j++;
            }
        } {
            point = i;// ポイントの初期値設定
            double tmpProbability = 1.0/n;

            if (point >= k) {
                probability += tmpProbability;
                continue;
            }

            int j = 1;
            while (point < k) {
                point *= 2;
                if (point >= k) {
                    tmpProbability *= Math.pow(0.5, (double)j);
                    probability += tmpProbability;
                    break;
                }
                j++;
            }
        } point = i point i double tmpProbability = 1.0/n; tmpProbability 1.0/n 1.0 n if (point >= k) {
                probability += tmpProbability;
                continue;
            } point >= k point k {
                probability += tmpProbability;
                continue;
            } probability += tmpProbability probability tmpProbability continue; int j = 1; j 1 while (point < k) {
                point *= 2;
                if (point >= k) {
                    tmpProbability *= Math.pow(0.5, (double)j);
                    probability += tmpProbability;
                    break;
                }
                j++;
            } point < k point k {
                point *= 2;
                if (point >= k) {
                    tmpProbability *= Math.pow(0.5, (double)j);
                    probability += tmpProbability;
                    break;
                }
                j++;
            } point *= 2 point 2 if (point >= k) {
                    tmpProbability *= Math.pow(0.5, (double)j);
                    probability += tmpProbability;
                    break;
                } point >= k point k {
                    tmpProbability *= Math.pow(0.5, (double)j);
                    probability += tmpProbability;
                    break;
                } tmpProbability *= Math.pow(0.5, (double)j) tmpProbability Math.pow(0.5, (double)j) Math.pow Math 0.5 (double)j probability += tmpProbability probability tmpProbability break; j++ j System.out.println(probability) System.out.println System.out System System.out probability String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int point = 0;
        double probability = 0.0f;

        for (int i = 1; i <= n; i++) {
            point = i;// ポイントの初期値設定
            double tmpProbability = 1.0/n;

            if (point >= k) {
                probability += tmpProbability;
                continue;
            }

            int j = 1;
            while (point < k) {
                point *= 2;
                if (point >= k) {
                    tmpProbability *= Math.pow(0.5, (double)j);
                    probability += tmpProbability;
                    break;
                }
                j++;
            }
        }

        System.out.println(probability);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int point = 0;
        double probability = 0.0f;

        for (int i = 1; i <= n; i++) {
            point = i;// ポイントの初期値設定
            double tmpProbability = 1.0/n;

            if (point >= k) {
                probability += tmpProbability;
                continue;
            }

            int j = 1;
            while (point < k) {
                point *= 2;
                if (point >= k) {
                    tmpProbability *= Math.pow(0.5, (double)j);
                    probability += tmpProbability;
                    break;
                }
                j++;
            }
        }

        System.out.println(probability);
    }
} Main
import java.util.*;
import java.lang.String;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int point = 0;
        double probability = 0.0f;

        for (int i = 1; i <= n; i++) {
            point = i;// ポイントの初期値設定
            double tmpProbability = 1.0/n;

            if (point >= k) {
                probability += tmpProbability;
                continue;
            }

            int j = 1;
            while (point < k) {
                point *= 2;
                if (point >= k) {
                    tmpProbability *= Math.pow(0.5, (double)j);
                    probability += tmpProbability;
                    break;
                }
                j++;
            }
        }

        System.out.println(probability);
    }
}
