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 count = 0;

        for(int i=1; i <= N; i++){
            double tmp02 = 1;

            for(int n=i; n < K; n=n*2){
                tmp02 = tmp02 * 0.5;
            }
            count = count + tmp02 / N;
        }
        System.out.print(count);
    }

} 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 count = 0;

        for(int i=1; i <= N; i++){
            double tmp02 = 1;

            for(int n=i; n < K; n=n*2){
                tmp02 = tmp02 * 0.5;
            }
            count = count + tmp02 / N;
        }
        System.out.print(count);
    }

} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int K = sc.nextInt();

        double count = 0;

        for(int i=1; i <= N; i++){
            double tmp02 = 1;

            for(int n=i; n < K; n=n*2){
                tmp02 = tmp02 * 0.5;
            }
            count = count + tmp02 / N;
        }
        System.out.print(count);
    } main {

        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int K = sc.nextInt();

        double count = 0;

        for(int i=1; i <= N; i++){
            double tmp02 = 1;

            for(int n=i; n < K; n=n*2){
                tmp02 = tmp02 * 0.5;
            }
            count = count + tmp02 / N;
        }
        System.out.print(count);
    } 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 count = 0; count 0 for(int i=1; i <= N; i++){
            double tmp02 = 1;

            for(int n=i; n < K; n=n*2){
                tmp02 = tmp02 * 0.5;
            }
            count = count + tmp02 / N;
        } int i=1; int i=1; i 1 i <= N i N i++ i++ i {
            double tmp02 = 1;

            for(int n=i; n < K; n=n*2){
                tmp02 = tmp02 * 0.5;
            }
            count = count + tmp02 / N;
        } {
            double tmp02 = 1;

            for(int n=i; n < K; n=n*2){
                tmp02 = tmp02 * 0.5;
            }
            count = count + tmp02 / N;
        } double tmp02 = 1; tmp02 1 for(int n=i; n < K; n=n*2){
                tmp02 = tmp02 * 0.5;
            } int n=i; int n=i; n i n < K n K n=n*2 n=n*2 n n*2 n 2 {
                tmp02 = tmp02 * 0.5;
            } {
                tmp02 = tmp02 * 0.5;
            } tmp02 = tmp02 * 0.5 tmp02 tmp02 * 0.5 tmp02 0.5 count = count + tmp02 / N count count + tmp02 / N count tmp02 / N tmp02 N System.out.print(count) System.out.print System.out System System.out count 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 count = 0;

        for(int i=1; i <= N; i++){
            double tmp02 = 1;

            for(int n=i; n < K; n=n*2){
                tmp02 = tmp02 * 0.5;
            }
            count = count + tmp02 / N;
        }
        System.out.print(count);
    }

} public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int K = sc.nextInt();

        double count = 0;

        for(int i=1; i <= N; i++){
            double tmp02 = 1;

            for(int n=i; n < K; n=n*2){
                tmp02 = tmp02 * 0.5;
            }
            count = count + tmp02 / N;
        }
        System.out.print(count);
    }

} 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 count = 0;

        for(int i=1; i <= N; i++){
            double tmp02 = 1;

            for(int n=i; n < K; n=n*2){
                tmp02 = tmp02 * 0.5;
            }
            count = count + tmp02 / N;
        }
        System.out.print(count);
    }

}