import java.util.*;
public class Main{
    
    static int howmany(int K,int t){
        int count=0;
        while(t<K){
            t=t*2;
            count++;
        }
        return count;
    }
        
     public static void main(String []args){
         
       Scanner sc=new Scanner(System.in);
       int N=sc.nextInt();
       int K=sc.nextInt();
       int i=0;
       double prob=0;
       
       for(int j=1; j<=N; j++){
           double temp=1/(double)N * (double)1/Math.pow(2,howmany(K,j));
           prob=temp+prob;
           
       }
     System.out.println(prob);   
     }
     
} import java.util.*; util.* java public class Main{
    
    static int howmany(int K,int t){
        int count=0;
        while(t<K){
            t=t*2;
            count++;
        }
        return count;
    }
        
     public static void main(String []args){
         
       Scanner sc=new Scanner(System.in);
       int N=sc.nextInt();
       int K=sc.nextInt();
       int i=0;
       double prob=0;
       
       for(int j=1; j<=N; j++){
           double temp=1/(double)N * (double)1/Math.pow(2,howmany(K,j));
           prob=temp+prob;
           
       }
     System.out.println(prob);   
     }
     
} Main static int howmany(int K,int t){
        int count=0;
        while(t<K){
            t=t*2;
            count++;
        }
        return count;
    } howmany {
        int count=0;
        while(t<K){
            t=t*2;
            count++;
        }
        return count;
    } int count=0; count 0 while(t<K){
            t=t*2;
            count++;
        } t<K t K {
            t=t*2;
            count++;
        } t=t*2 t t*2 t 2 count++ count return count; count int K K int t t public static void main(String []args){
         
       Scanner sc=new Scanner(System.in);
       int N=sc.nextInt();
       int K=sc.nextInt();
       int i=0;
       double prob=0;
       
       for(int j=1; j<=N; j++){
           double temp=1/(double)N * (double)1/Math.pow(2,howmany(K,j));
           prob=temp+prob;
           
       }
     System.out.println(prob);   
     } main {
         
       Scanner sc=new Scanner(System.in);
       int N=sc.nextInt();
       int K=sc.nextInt();
       int i=0;
       double prob=0;
       
       for(int j=1; j<=N; j++){
           double temp=1/(double)N * (double)1/Math.pow(2,howmany(K,j));
           prob=temp+prob;
           
       }
     System.out.println(prob);   
     } 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 int i=0; i 0 double prob=0; prob 0 for(int j=1; j<=N; j++){
           double temp=1/(double)N * (double)1/Math.pow(2,howmany(K,j));
           prob=temp+prob;
           
       } int j=1; int j=1; j 1 j<=N j N j++ j++ j {
           double temp=1/(double)N * (double)1/Math.pow(2,howmany(K,j));
           prob=temp+prob;
           
       } {
           double temp=1/(double)N * (double)1/Math.pow(2,howmany(K,j));
           prob=temp+prob;
           
       } double temp=1/(double)N * (double)1/Math.pow(2,howmany(K,j)); temp 1/(double)N * (double)1/Math.pow(2,howmany(K,j)) 1/(double)N * (double)1 1/(double)N 1 (double)N (double)1 Math.pow(2,howmany(K,j)) Math.pow Math 2 howmany(K,j) howmany K j prob=temp+prob prob temp+prob temp prob System.out.println(prob) System.out.println System.out System System.out prob String []args args public class Main{
    
    static int howmany(int K,int t){
        int count=0;
        while(t<K){
            t=t*2;
            count++;
        }
        return count;
    }
        
     public static void main(String []args){
         
       Scanner sc=new Scanner(System.in);
       int N=sc.nextInt();
       int K=sc.nextInt();
       int i=0;
       double prob=0;
       
       for(int j=1; j<=N; j++){
           double temp=1/(double)N * (double)1/Math.pow(2,howmany(K,j));
           prob=temp+prob;
           
       }
     System.out.println(prob);   
     }
     
} public class Main{
    
    static int howmany(int K,int t){
        int count=0;
        while(t<K){
            t=t*2;
            count++;
        }
        return count;
    }
        
     public static void main(String []args){
         
       Scanner sc=new Scanner(System.in);
       int N=sc.nextInt();
       int K=sc.nextInt();
       int i=0;
       double prob=0;
       
       for(int j=1; j<=N; j++){
           double temp=1/(double)N * (double)1/Math.pow(2,howmany(K,j));
           prob=temp+prob;
           
       }
     System.out.println(prob);   
     }
     
} Main
import java.util.*;
public class Main{
    
    static int howmany(int K,int t){
        int count=0;
        while(t<K){
            t=t*2;
            count++;
        }
        return count;
    }
        
     public static void main(String []args){
         
       Scanner sc=new Scanner(System.in);
       int N=sc.nextInt();
       int K=sc.nextInt();
       int i=0;
       double prob=0;
       
       for(int j=1; j<=N; j++){
           double temp=1/(double)N * (double)1/Math.pow(2,howmany(K,j));
           prob=temp+prob;
           
       }
     System.out.println(prob);   
     }
     
}