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();
        double bunbo = 0;
        int a = 1;
        while (a < k) {
            a *= 2;
            bunbo += 1;
        }
        double bunshi = 1;
        for (int i = 2; i < n + 1; i++) {
            int count = 0;
            int j = i;
            while (j < k) {
                j *= 2;
                count += 1;
            }
            bunshi += Math.pow(2, bunbo - count);
        }
        System.out.println(bunshi / (Math.pow(2, bunbo) * n));
    }
} 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();
        double bunbo = 0;
        int a = 1;
        while (a < k) {
            a *= 2;
            bunbo += 1;
        }
        double bunshi = 1;
        for (int i = 2; i < n + 1; i++) {
            int count = 0;
            int j = i;
            while (j < k) {
                j *= 2;
                count += 1;
            }
            bunshi += Math.pow(2, bunbo - count);
        }
        System.out.println(bunshi / (Math.pow(2, bunbo) * n));
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        double bunbo = 0;
        int a = 1;
        while (a < k) {
            a *= 2;
            bunbo += 1;
        }
        double bunshi = 1;
        for (int i = 2; i < n + 1; i++) {
            int count = 0;
            int j = i;
            while (j < k) {
                j *= 2;
                count += 1;
            }
            bunshi += Math.pow(2, bunbo - count);
        }
        System.out.println(bunshi / (Math.pow(2, bunbo) * n));
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        double bunbo = 0;
        int a = 1;
        while (a < k) {
            a *= 2;
            bunbo += 1;
        }
        double bunshi = 1;
        for (int i = 2; i < n + 1; i++) {
            int count = 0;
            int j = i;
            while (j < k) {
                j *= 2;
                count += 1;
            }
            bunshi += Math.pow(2, bunbo - count);
        }
        System.out.println(bunshi / (Math.pow(2, bunbo) * n));
    } 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 bunbo = 0; bunbo 0 int a = 1; a 1 while (a < k) {
            a *= 2;
            bunbo += 1;
        } a < k a k {
            a *= 2;
            bunbo += 1;
        } a *= 2 a 2 bunbo += 1 bunbo 1 double bunshi = 1; bunshi 1 for (int i = 2; i < n + 1; i++) {
            int count = 0;
            int j = i;
            while (j < k) {
                j *= 2;
                count += 1;
            }
            bunshi += Math.pow(2, bunbo - count);
        } int i = 2; int i = 2; i 2 i < n + 1 i n + 1 n 1 i++ i++ i {
            int count = 0;
            int j = i;
            while (j < k) {
                j *= 2;
                count += 1;
            }
            bunshi += Math.pow(2, bunbo - count);
        } {
            int count = 0;
            int j = i;
            while (j < k) {
                j *= 2;
                count += 1;
            }
            bunshi += Math.pow(2, bunbo - count);
        } int count = 0; count 0 int j = i; j i while (j < k) {
                j *= 2;
                count += 1;
            } j < k j k {
                j *= 2;
                count += 1;
            } j *= 2 j 2 count += 1 count 1 bunshi += Math.pow(2, bunbo - count) bunshi Math.pow(2, bunbo - count) Math.pow Math 2 bunbo - count bunbo count System.out.println(bunshi / (Math.pow(2, bunbo) * n)) System.out.println System.out System System.out bunshi / (Math.pow(2, bunbo) * n) bunshi (Math.pow(2, bunbo) * n) Math.pow(2, bunbo) Math.pow Math 2 bunbo n 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 bunbo = 0;
        int a = 1;
        while (a < k) {
            a *= 2;
            bunbo += 1;
        }
        double bunshi = 1;
        for (int i = 2; i < n + 1; i++) {
            int count = 0;
            int j = i;
            while (j < k) {
                j *= 2;
                count += 1;
            }
            bunshi += Math.pow(2, bunbo - count);
        }
        System.out.println(bunshi / (Math.pow(2, bunbo) * n));
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        double bunbo = 0;
        int a = 1;
        while (a < k) {
            a *= 2;
            bunbo += 1;
        }
        double bunshi = 1;
        for (int i = 2; i < n + 1; i++) {
            int count = 0;
            int j = i;
            while (j < k) {
                j *= 2;
                count += 1;
            }
            bunshi += Math.pow(2, bunbo - count);
        }
        System.out.println(bunshi / (Math.pow(2, bunbo) * n));
    }
} 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();
        double bunbo = 0;
        int a = 1;
        while (a < k) {
            a *= 2;
            bunbo += 1;
        }
        double bunshi = 1;
        for (int i = 2; i < n + 1; i++) {
            int count = 0;
            int j = i;
            while (j < k) {
                j *= 2;
                count += 1;
            }
            bunshi += Math.pow(2, bunbo - count);
        }
        System.out.println(bunshi / (Math.pow(2, bunbo) * n));
    }
}