import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double n = scanner.nextInt();
        double k = scanner.nextInt();
        double p = 0;

        for(int start = 1 ; start <= n ; start++){
            int count;
            int point = start;

            for(count = 0; point < k ; count++){
                point *= 2;
            }
            p += (1 / n) * (Math.pow(2 , -1 * count));
        }

        System.out.println(p);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double n = scanner.nextInt();
        double k = scanner.nextInt();
        double p = 0;

        for(int start = 1 ; start <= n ; start++){
            int count;
            int point = start;

            for(count = 0; point < k ; count++){
                point *= 2;
            }
            p += (1 / n) * (Math.pow(2 , -1 * count));
        }

        System.out.println(p);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double n = scanner.nextInt();
        double k = scanner.nextInt();
        double p = 0;

        for(int start = 1 ; start <= n ; start++){
            int count;
            int point = start;

            for(count = 0; point < k ; count++){
                point *= 2;
            }
            p += (1 / n) * (Math.pow(2 , -1 * count));
        }

        System.out.println(p);
    } main {
        Scanner scanner = new Scanner(System.in);
        double n = scanner.nextInt();
        double k = scanner.nextInt();
        double p = 0;

        for(int start = 1 ; start <= n ; start++){
            int count;
            int point = start;

            for(count = 0; point < k ; count++){
                point *= 2;
            }
            p += (1 / n) * (Math.pow(2 , -1 * count));
        }

        System.out.println(p);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) double n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner double k = scanner.nextInt(); k scanner.nextInt() scanner.nextInt scanner double p = 0; p 0 for(int start = 1 ; start <= n ; start++){
            int count;
            int point = start;

            for(count = 0; point < k ; count++){
                point *= 2;
            }
            p += (1 / n) * (Math.pow(2 , -1 * count));
        } int start = 1 ; int start = 1 ; start 1 start <= n start n start++ start++ start {
            int count;
            int point = start;

            for(count = 0; point < k ; count++){
                point *= 2;
            }
            p += (1 / n) * (Math.pow(2 , -1 * count));
        } {
            int count;
            int point = start;

            for(count = 0; point < k ; count++){
                point *= 2;
            }
            p += (1 / n) * (Math.pow(2 , -1 * count));
        } int count; count int point = start; point start for(count = 0; point < k ; count++){
                point *= 2;
            } count = 0; count = 0 count 0 point < k point k count++ count++ count {
                point *= 2;
            } {
                point *= 2;
            } point *= 2 point 2 p += (1 / n) * (Math.pow(2 , -1 * count)) p (1 / n) * (Math.pow(2 , -1 * count)) (1 / n) 1 n (Math.pow(2 , -1 * count)) Math.pow Math 2 -1 * count -1 1 count System.out.println(p) System.out.println System.out System System.out p String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double n = scanner.nextInt();
        double k = scanner.nextInt();
        double p = 0;

        for(int start = 1 ; start <= n ; start++){
            int count;
            int point = start;

            for(count = 0; point < k ; count++){
                point *= 2;
            }
            p += (1 / n) * (Math.pow(2 , -1 * count));
        }

        System.out.println(p);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double n = scanner.nextInt();
        double k = scanner.nextInt();
        double p = 0;

        for(int start = 1 ; start <= n ; start++){
            int count;
            int point = start;

            for(count = 0; point < k ; count++){
                point *= 2;
            }
            p += (1 / n) * (Math.pow(2 , -1 * count));
        }

        System.out.println(p);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double n = scanner.nextInt();
        double k = scanner.nextInt();
        double p = 0;

        for(int start = 1 ; start <= n ; start++){
            int count;
            int point = start;

            for(count = 0; point < k ; count++){
                point *= 2;
            }
            p += (1 / n) * (Math.pow(2 , -1 * count));
        }

        System.out.println(p);
    }
}