import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int K = sc.nextInt();
        
        double probability = 0;
        
        for(int i = 1; i <= N; i++){
            if ( i >= K ) {
                probability += 1.0;
            } else {
                double x =  Math.log( (double)K/i ) / Math.log(2) ;
                x = Math.max(Math.ceil(x) , 1);
                probability += 1 / Math.pow(2, x);   
            }
        }
        
        System.out.println(probability/N);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int K = sc.nextInt();
        
        double probability = 0;
        
        for(int i = 1; i <= N; i++){
            if ( i >= K ) {
                probability += 1.0;
            } else {
                double x =  Math.log( (double)K/i ) / Math.log(2) ;
                x = Math.max(Math.ceil(x) , 1);
                probability += 1 / Math.pow(2, x);   
            }
        }
        
        System.out.println(probability/N);
    }
} Main public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int K = sc.nextInt();
        
        double probability = 0;
        
        for(int i = 1; i <= N; i++){
            if ( i >= K ) {
                probability += 1.0;
            } else {
                double x =  Math.log( (double)K/i ) / Math.log(2) ;
                x = Math.max(Math.ceil(x) , 1);
                probability += 1 / Math.pow(2, x);   
            }
        }
        
        System.out.println(probability/N);
    } main {

        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int K = sc.nextInt();
        
        double probability = 0;
        
        for(int i = 1; i <= N; i++){
            if ( i >= K ) {
                probability += 1.0;
            } else {
                double x =  Math.log( (double)K/i ) / Math.log(2) ;
                x = Math.max(Math.ceil(x) , 1);
                probability += 1 / Math.pow(2, x);   
            }
        }
        
        System.out.println(probability/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 probability = 0; probability 0 for(int i = 1; i <= N; i++){
            if ( i >= K ) {
                probability += 1.0;
            } else {
                double x =  Math.log( (double)K/i ) / Math.log(2) ;
                x = Math.max(Math.ceil(x) , 1);
                probability += 1 / Math.pow(2, x);   
            }
        } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
            if ( i >= K ) {
                probability += 1.0;
            } else {
                double x =  Math.log( (double)K/i ) / Math.log(2) ;
                x = Math.max(Math.ceil(x) , 1);
                probability += 1 / Math.pow(2, x);   
            }
        } {
            if ( i >= K ) {
                probability += 1.0;
            } else {
                double x =  Math.log( (double)K/i ) / Math.log(2) ;
                x = Math.max(Math.ceil(x) , 1);
                probability += 1 / Math.pow(2, x);   
            }
        } if ( i >= K ) {
                probability += 1.0;
            } else {
                double x =  Math.log( (double)K/i ) / Math.log(2) ;
                x = Math.max(Math.ceil(x) , 1);
                probability += 1 / Math.pow(2, x);   
            } i >= K i K {
                probability += 1.0;
            } probability += 1.0 probability 1.0 {
                double x =  Math.log( (double)K/i ) / Math.log(2) ;
                x = Math.max(Math.ceil(x) , 1);
                probability += 1 / Math.pow(2, x);   
            } double x =  Math.log( (double)K/i ) / Math.log(2) ; x Math.log( (double)K/i ) / Math.log(2) Math.log( (double)K/i ) Math.log Math (double)K/i (double)K i Math.log(2) Math.log Math 2 x = Math.max(Math.ceil(x) , 1) x Math.max(Math.ceil(x) , 1) Math.max Math Math.ceil(x) Math.ceil Math x 1 probability += 1 / Math.pow(2, x) probability 1 / Math.pow(2, x) 1 Math.pow(2, x) Math.pow Math 2 x System.out.println(probability/N) System.out.println System.out System System.out probability/N probability N String[] args args public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int K = sc.nextInt();
        
        double probability = 0;
        
        for(int i = 1; i <= N; i++){
            if ( i >= K ) {
                probability += 1.0;
            } else {
                double x =  Math.log( (double)K/i ) / Math.log(2) ;
                x = Math.max(Math.ceil(x) , 1);
                probability += 1 / Math.pow(2, x);   
            }
        }
        
        System.out.println(probability/N);
    }
} public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int K = sc.nextInt();
        
        double probability = 0;
        
        for(int i = 1; i <= N; i++){
            if ( i >= K ) {
                probability += 1.0;
            } else {
                double x =  Math.log( (double)K/i ) / Math.log(2) ;
                x = Math.max(Math.ceil(x) , 1);
                probability += 1 / Math.pow(2, x);   
            }
        }
        
        System.out.println(probability/N);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int K = sc.nextInt();
        
        double probability = 0;
        
        for(int i = 1; i <= N; i++){
            if ( i >= K ) {
                probability += 1.0;
            } else {
                double x =  Math.log( (double)K/i ) / Math.log(2) ;
                x = Math.max(Math.ceil(x) , 1);
                probability += 1 / Math.pow(2, x);   
            }
        }
        
        System.out.println(probability/N);
    }
}
