import java.util.Scanner;

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

        double first = 1.0d/(double) n;

        double res = 0.0d;
        for (int i = 1; i <= n; i++) {
            int tmp = i;
            double zyo = 0.0d;
            while (tmp <= k-1) {
                zyo++;
                tmp *= 2;
            }
//            if (zyo == 0.0d) zyo = 1.0d;
            res += Math.pow(0.5d, zyo);
        }
        System.out.println(res * first);
    }
} import java.util.Scanner; Scanner 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();

        double first = 1.0d/(double) n;

        double res = 0.0d;
        for (int i = 1; i <= n; i++) {
            int tmp = i;
            double zyo = 0.0d;
            while (tmp <= k-1) {
                zyo++;
                tmp *= 2;
            }
//            if (zyo == 0.0d) zyo = 1.0d;
            res += Math.pow(0.5d, zyo);
        }
        System.out.println(res * first);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();

        double first = 1.0d/(double) n;

        double res = 0.0d;
        for (int i = 1; i <= n; i++) {
            int tmp = i;
            double zyo = 0.0d;
            while (tmp <= k-1) {
                zyo++;
                tmp *= 2;
            }
//            if (zyo == 0.0d) zyo = 1.0d;
            res += Math.pow(0.5d, zyo);
        }
        System.out.println(res * first);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();

        double first = 1.0d/(double) n;

        double res = 0.0d;
        for (int i = 1; i <= n; i++) {
            int tmp = i;
            double zyo = 0.0d;
            while (tmp <= k-1) {
                zyo++;
                tmp *= 2;
            }
//            if (zyo == 0.0d) zyo = 1.0d;
            res += Math.pow(0.5d, zyo);
        }
        System.out.println(res * first);
    } 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 double first = 1.0d/(double) n; first 1.0d/(double) n 1.0d (double) n double res = 0.0d; res 0.0d for (int i = 1; i <= n; i++) {
            int tmp = i;
            double zyo = 0.0d;
            while (tmp <= k-1) {
                zyo++;
                tmp *= 2;
            }
//            if (zyo == 0.0d) zyo = 1.0d;
            res += Math.pow(0.5d, zyo);
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            int tmp = i;
            double zyo = 0.0d;
            while (tmp <= k-1) {
                zyo++;
                tmp *= 2;
            }
//            if (zyo == 0.0d) zyo = 1.0d;
            res += Math.pow(0.5d, zyo);
        } {
            int tmp = i;
            double zyo = 0.0d;
            while (tmp <= k-1) {
                zyo++;
                tmp *= 2;
            }
//            if (zyo == 0.0d) zyo = 1.0d;
            res += Math.pow(0.5d, zyo);
        } int tmp = i; tmp i double zyo = 0.0d; zyo 0.0d while (tmp <= k-1) {
                zyo++;
                tmp *= 2;
            } tmp <= k-1 tmp k-1 k 1 {
                zyo++;
                tmp *= 2;
            } zyo++ zyo tmp *= 2 tmp 2 res += Math.pow(0.5d, zyo) res Math.pow(0.5d, zyo) Math.pow Math 0.5d zyo System.out.println(res * first) System.out.println System.out System System.out res * first res first 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();

        double first = 1.0d/(double) n;

        double res = 0.0d;
        for (int i = 1; i <= n; i++) {
            int tmp = i;
            double zyo = 0.0d;
            while (tmp <= k-1) {
                zyo++;
                tmp *= 2;
            }
//            if (zyo == 0.0d) zyo = 1.0d;
            res += Math.pow(0.5d, zyo);
        }
        System.out.println(res * first);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();

        double first = 1.0d/(double) n;

        double res = 0.0d;
        for (int i = 1; i <= n; i++) {
            int tmp = i;
            double zyo = 0.0d;
            while (tmp <= k-1) {
                zyo++;
                tmp *= 2;
            }
//            if (zyo == 0.0d) zyo = 1.0d;
            res += Math.pow(0.5d, zyo);
        }
        System.out.println(res * first);
    }
} Main
import java.util.Scanner;

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

        double first = 1.0d/(double) n;

        double res = 0.0d;
        for (int i = 1; i <= n; i++) {
            int tmp = i;
            double zyo = 0.0d;
            while (tmp <= k-1) {
                zyo++;
                tmp *= 2;
            }
//            if (zyo == 0.0d) zyo = 1.0d;
            res += Math.pow(0.5d, zyo);
        }
        System.out.println(res * first);
    }
}
