import java.util.Scanner;

public class Main {

    public static void main( String[] args ){

        Scanner in = new Scanner(System.in);
        String param = in.nextLine();
        String[] splitParams = param.split(" ");
        int n = Integer.parseInt(splitParams[0]);
        int k = Integer.parseInt(splitParams[1]);

        double ans = 0;

        for( int i = 1 ; i <= n ; i++ ){
            int point = i;
            int count = 0;
            while( point < k ){
                point *= 2;
                count++;
            }
            ans += 1.0/n*Math.pow(0.5,count);
        }

        System.out.println(ans);

    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main( String[] args ){

        Scanner in = new Scanner(System.in);
        String param = in.nextLine();
        String[] splitParams = param.split(" ");
        int n = Integer.parseInt(splitParams[0]);
        int k = Integer.parseInt(splitParams[1]);

        double ans = 0;

        for( int i = 1 ; i <= n ; i++ ){
            int point = i;
            int count = 0;
            while( point < k ){
                point *= 2;
                count++;
            }
            ans += 1.0/n*Math.pow(0.5,count);
        }

        System.out.println(ans);

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

        Scanner in = new Scanner(System.in);
        String param = in.nextLine();
        String[] splitParams = param.split(" ");
        int n = Integer.parseInt(splitParams[0]);
        int k = Integer.parseInt(splitParams[1]);

        double ans = 0;

        for( int i = 1 ; i <= n ; i++ ){
            int point = i;
            int count = 0;
            while( point < k ){
                point *= 2;
                count++;
            }
            ans += 1.0/n*Math.pow(0.5,count);
        }

        System.out.println(ans);

    } main {

        Scanner in = new Scanner(System.in);
        String param = in.nextLine();
        String[] splitParams = param.split(" ");
        int n = Integer.parseInt(splitParams[0]);
        int k = Integer.parseInt(splitParams[1]);

        double ans = 0;

        for( int i = 1 ; i <= n ; i++ ){
            int point = i;
            int count = 0;
            while( point < k ){
                point *= 2;
                count++;
            }
            ans += 1.0/n*Math.pow(0.5,count);
        }

        System.out.println(ans);

    } Scanner in = new Scanner(System.in); in new Scanner(System.in) String param = in.nextLine(); param in.nextLine() in.nextLine in String[] splitParams = param.split(" "); splitParams param.split(" ") param.split param " " int n = Integer.parseInt(splitParams[0]); n Integer.parseInt(splitParams[0]) Integer.parseInt Integer splitParams[0] splitParams 0 int k = Integer.parseInt(splitParams[1]); k Integer.parseInt(splitParams[1]) Integer.parseInt Integer splitParams[1] splitParams 1 double ans = 0; ans 0 for( int i = 1 ; i <= n ; i++ ){
            int point = i;
            int count = 0;
            while( point < k ){
                point *= 2;
                count++;
            }
            ans += 1.0/n*Math.pow(0.5,count);
        } int i = 1 ; int i = 1 ; i 1 i <= n i n i++ i++ i {
            int point = i;
            int count = 0;
            while( point < k ){
                point *= 2;
                count++;
            }
            ans += 1.0/n*Math.pow(0.5,count);
        } {
            int point = i;
            int count = 0;
            while( point < k ){
                point *= 2;
                count++;
            }
            ans += 1.0/n*Math.pow(0.5,count);
        } int point = i; point i int count = 0; count 0 while( point < k ){
                point *= 2;
                count++;
            } point < k point k {
                point *= 2;
                count++;
            } point *= 2 point 2 count++ count ans += 1.0/n*Math.pow(0.5,count) ans 1.0/n*Math.pow(0.5,count) 1.0/n 1.0 n Math.pow(0.5,count) Math.pow Math 0.5 count System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

    public static void main( String[] args ){

        Scanner in = new Scanner(System.in);
        String param = in.nextLine();
        String[] splitParams = param.split(" ");
        int n = Integer.parseInt(splitParams[0]);
        int k = Integer.parseInt(splitParams[1]);

        double ans = 0;

        for( int i = 1 ; i <= n ; i++ ){
            int point = i;
            int count = 0;
            while( point < k ){
                point *= 2;
                count++;
            }
            ans += 1.0/n*Math.pow(0.5,count);
        }

        System.out.println(ans);

    }
} public class Main {

    public static void main( String[] args ){

        Scanner in = new Scanner(System.in);
        String param = in.nextLine();
        String[] splitParams = param.split(" ");
        int n = Integer.parseInt(splitParams[0]);
        int k = Integer.parseInt(splitParams[1]);

        double ans = 0;

        for( int i = 1 ; i <= n ; i++ ){
            int point = i;
            int count = 0;
            while( point < k ){
                point *= 2;
                count++;
            }
            ans += 1.0/n*Math.pow(0.5,count);
        }

        System.out.println(ans);

    }
} Main
import java.util.Scanner;

public class Main {

    public static void main( String[] args ){

        Scanner in = new Scanner(System.in);
        String param = in.nextLine();
        String[] splitParams = param.split(" ");
        int n = Integer.parseInt(splitParams[0]);
        int k = Integer.parseInt(splitParams[1]);

        double ans = 0;

        for( int i = 1 ; i <= n ; i++ ){
            int point = i;
            int count = 0;
            while( point < k ){
                point *= 2;
                count++;
            }
            ans += 1.0/n*Math.pow(0.5,count);
        }

        System.out.println(ans);

    }
}