import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        double N = sc.nextDouble();
        double K = sc.nextDouble();
        double Ans= 0.0;
        for(double i=1.0; i<=N;i++){Ans += 1/((i < K) ? Math.pow(2,Math.ceil(Math.log(K/i)/Math.log(2.0))) : 1.0);}
        Ans /= N;
        System.out.println(Ans);
        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        double N = sc.nextDouble();
        double K = sc.nextDouble();
        double Ans= 0.0;
        for(double i=1.0; i<=N;i++){Ans += 1/((i < K) ? Math.pow(2,Math.ceil(Math.log(K/i)/Math.log(2.0))) : 1.0);}
        Ans /= N;
        System.out.println(Ans);
        sc.close();
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        double N = sc.nextDouble();
        double K = sc.nextDouble();
        double Ans= 0.0;
        for(double i=1.0; i<=N;i++){Ans += 1/((i < K) ? Math.pow(2,Math.ceil(Math.log(K/i)/Math.log(2.0))) : 1.0);}
        Ans /= N;
        System.out.println(Ans);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        double N = sc.nextDouble();
        double K = sc.nextDouble();
        double Ans= 0.0;
        for(double i=1.0; i<=N;i++){Ans += 1/((i < K) ? Math.pow(2,Math.ceil(Math.log(K/i)/Math.log(2.0))) : 1.0);}
        Ans /= N;
        System.out.println(Ans);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) double N = sc.nextDouble(); N sc.nextDouble() sc.nextDouble sc double K = sc.nextDouble(); K sc.nextDouble() sc.nextDouble sc double Ans= 0.0; Ans 0.0 for(double i=1.0; i<=N;i++){Ans += 1/((i < K) ? Math.pow(2,Math.ceil(Math.log(K/i)/Math.log(2.0))) : 1.0);} double i=1.0; double i=1.0; i 1.0 i<=N i N i++ i++ i {Ans += 1/((i < K) ? Math.pow(2,Math.ceil(Math.log(K/i)/Math.log(2.0))) : 1.0);} {Ans += 1/((i < K) ? Math.pow(2,Math.ceil(Math.log(K/i)/Math.log(2.0))) : 1.0);} Ans += 1/((i < K) ? Math.pow(2,Math.ceil(Math.log(K/i)/Math.log(2.0))) : 1.0) Ans 1/((i < K) ? Math.pow(2,Math.ceil(Math.log(K/i)/Math.log(2.0))) : 1.0) 1 ((i < K) ? Math.pow(2,Math.ceil(Math.log(K/i)/Math.log(2.0))) : 1.0) (i < K) i K Math.pow(2,Math.ceil(Math.log(K/i)/Math.log(2.0))) Math.pow Math 2 Math.ceil(Math.log(K/i)/Math.log(2.0)) Math.ceil Math Math.log(K/i)/Math.log(2.0) Math.log(K/i) Math.log Math K/i K i Math.log(2.0) Math.log Math 2.0 1.0 Ans /= N Ans N System.out.println(Ans) System.out.println System.out System System.out Ans sc.close() sc.close sc String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        double N = sc.nextDouble();
        double K = sc.nextDouble();
        double Ans= 0.0;
        for(double i=1.0; i<=N;i++){Ans += 1/((i < K) ? Math.pow(2,Math.ceil(Math.log(K/i)/Math.log(2.0))) : 1.0);}
        Ans /= N;
        System.out.println(Ans);
        sc.close();
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        double N = sc.nextDouble();
        double K = sc.nextDouble();
        double Ans= 0.0;
        for(double i=1.0; i<=N;i++){Ans += 1/((i < K) ? Math.pow(2,Math.ceil(Math.log(K/i)/Math.log(2.0))) : 1.0);}
        Ans /= N;
        System.out.println(Ans);
        sc.close();
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        double N = sc.nextDouble();
        double K = sc.nextDouble();
        double Ans= 0.0;
        for(double i=1.0; i<=N;i++){Ans += 1/((i < K) ? Math.pow(2,Math.ceil(Math.log(K/i)/Math.log(2.0))) : 1.0);}
        Ans /= N;
        System.out.println(Ans);
        sc.close();
    }
}