import java.util.*;
public class Main
{static int c=0;
    public static void main(String[] args)
    { Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        int k=sc.nextInt();
        double sum_power=0,count=0;
        if ((num>=1 && num<=100000) && (k>=1 && k<=100000)){
        for(int i=1;i<=num;i++){
            count=doublet(i,k);
        double p=Math.pow(2,count)*num;
            sum_power=sum_power+1/p;
            c=0;
        }
        System.out.println(sum_power);
    }
}

    static int doublet(int n,int f){
        if (n<f){
            c=c+1;
            return doublet(2*n,f);}
        else
            return c;}
        }
 import java.util.*; util.* java public class Main
{static int c=0;
    public static void main(String[] args)
    { Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        int k=sc.nextInt();
        double sum_power=0,count=0;
        if ((num>=1 && num<=100000) && (k>=1 && k<=100000)){
        for(int i=1;i<=num;i++){
            count=doublet(i,k);
        double p=Math.pow(2,count)*num;
            sum_power=sum_power+1/p;
            c=0;
        }
        System.out.println(sum_power);
    }
}

    static int doublet(int n,int f){
        if (n<f){
            c=c+1;
            return doublet(2*n,f);}
        else
            return c;}
        } Main static int c=0; c 0 public static void main(String[] args)
    { Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        int k=sc.nextInt();
        double sum_power=0,count=0;
        if ((num>=1 && num<=100000) && (k>=1 && k<=100000)){
        for(int i=1;i<=num;i++){
            count=doublet(i,k);
        double p=Math.pow(2,count)*num;
            sum_power=sum_power+1/p;
            c=0;
        }
        System.out.println(sum_power);
    }
} main { Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        int k=sc.nextInt();
        double sum_power=0,count=0;
        if ((num>=1 && num<=100000) && (k>=1 && k<=100000)){
        for(int i=1;i<=num;i++){
            count=doublet(i,k);
        double p=Math.pow(2,count)*num;
            sum_power=sum_power+1/p;
            c=0;
        }
        System.out.println(sum_power);
    }
} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int num=sc.nextInt(); num sc.nextInt() sc.nextInt sc int k=sc.nextInt(); k sc.nextInt() sc.nextInt sc double sum_power=0 sum_power 0 count=0; count 0 if ((num>=1 && num<=100000) && (k>=1 && k<=100000)){
        for(int i=1;i<=num;i++){
            count=doublet(i,k);
        double p=Math.pow(2,count)*num;
            sum_power=sum_power+1/p;
            c=0;
        }
        System.out.println(sum_power);
    } (num>=1 && num<=100000) && (k>=1 && k<=100000) (num>=1 && num<=100000) num>=1 num 1 num<=100000 num 100000 (k>=1 && k<=100000) k>=1 k 1 k<=100000 k 100000 {
        for(int i=1;i<=num;i++){
            count=doublet(i,k);
        double p=Math.pow(2,count)*num;
            sum_power=sum_power+1/p;
            c=0;
        }
        System.out.println(sum_power);
    } for(int i=1;i<=num;i++){
            count=doublet(i,k);
        double p=Math.pow(2,count)*num;
            sum_power=sum_power+1/p;
            c=0;
        } int i=1; int i=1; i 1 i<=num i num i++ i++ i {
            count=doublet(i,k);
        double p=Math.pow(2,count)*num;
            sum_power=sum_power+1/p;
            c=0;
        } {
            count=doublet(i,k);
        double p=Math.pow(2,count)*num;
            sum_power=sum_power+1/p;
            c=0;
        } count=doublet(i,k) count doublet(i,k) doublet i k double p=Math.pow(2,count)*num; p Math.pow(2,count)*num Math.pow(2,count) Math.pow Math 2 count num sum_power=sum_power+1/p sum_power sum_power+1/p sum_power 1/p 1 p c=0 c 0 System.out.println(sum_power) System.out.println System.out System System.out sum_power String[] args args static int doublet(int n,int f){
        if (n<f){
            c=c+1;
            return doublet(2*n,f);}
        else
            return c;} doublet {
        if (n<f){
            c=c+1;
            return doublet(2*n,f);}
        else
            return c;} if (n<f){
            c=c+1;
            return doublet(2*n,f);}
        else
            return c; n<f n f {
            c=c+1;
            return doublet(2*n,f);} c=c+1 c c+1 c 1 return doublet(2*n,f); doublet(2*n,f) doublet 2*n 2 n f return c; c int n n int f f public class Main
{static int c=0;
    public static void main(String[] args)
    { Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        int k=sc.nextInt();
        double sum_power=0,count=0;
        if ((num>=1 && num<=100000) && (k>=1 && k<=100000)){
        for(int i=1;i<=num;i++){
            count=doublet(i,k);
        double p=Math.pow(2,count)*num;
            sum_power=sum_power+1/p;
            c=0;
        }
        System.out.println(sum_power);
    }
}

    static int doublet(int n,int f){
        if (n<f){
            c=c+1;
            return doublet(2*n,f);}
        else
            return c;}
        } public class Main
{static int c=0;
    public static void main(String[] args)
    { Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        int k=sc.nextInt();
        double sum_power=0,count=0;
        if ((num>=1 && num<=100000) && (k>=1 && k<=100000)){
        for(int i=1;i<=num;i++){
            count=doublet(i,k);
        double p=Math.pow(2,count)*num;
            sum_power=sum_power+1/p;
            c=0;
        }
        System.out.println(sum_power);
    }
}

    static int doublet(int n,int f){
        if (n<f){
            c=c+1;
            return doublet(2*n,f);}
        else
            return c;}
        } Main
import java.util.*;
public class Main
{static int c=0;
    public static void main(String[] args)
    { Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        int k=sc.nextInt();
        double sum_power=0,count=0;
        if ((num>=1 && num<=100000) && (k>=1 && k<=100000)){
        for(int i=1;i<=num;i++){
            count=doublet(i,k);
        double p=Math.pow(2,count)*num;
            sum_power=sum_power+1/p;
            c=0;
        }
        System.out.println(sum_power);
    }
}

    static int doublet(int n,int f){
        if (n<f){
            c=c+1;
            return doublet(2*n,f);}
        else
            return c;}
        }

