import java.util.Scanner;
//2-3
public class Main{
    public static void main(String [] args){
    	Scanner scan=new Scanner(System.in);
    	int n=scan.nextInt();
    	int k=scan.nextInt();
    	int a=0;
    	int b=0;
    	double c=0;
    	double ans=0;
    	for(int i=1;i<=n;i++){
    		a=i;
    		while(a<k) {
    			a*=2;
    			b++;
    		}
    		c=n*Math.pow(2, b);
    		ans+=1/c;
    		//System.out.println(c);
    		a=0;
    		b=0;
    		c=0;
    	}
    	System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String [] args){
    	Scanner scan=new Scanner(System.in);
    	int n=scan.nextInt();
    	int k=scan.nextInt();
    	int a=0;
    	int b=0;
    	double c=0;
    	double ans=0;
    	for(int i=1;i<=n;i++){
    		a=i;
    		while(a<k) {
    			a*=2;
    			b++;
    		}
    		c=n*Math.pow(2, b);
    		ans+=1/c;
    		//System.out.println(c);
    		a=0;
    		b=0;
    		c=0;
    	}
    	System.out.println(ans);
    }
} Main public static void main(String [] args){
    	Scanner scan=new Scanner(System.in);
    	int n=scan.nextInt();
    	int k=scan.nextInt();
    	int a=0;
    	int b=0;
    	double c=0;
    	double ans=0;
    	for(int i=1;i<=n;i++){
    		a=i;
    		while(a<k) {
    			a*=2;
    			b++;
    		}
    		c=n*Math.pow(2, b);
    		ans+=1/c;
    		//System.out.println(c);
    		a=0;
    		b=0;
    		c=0;
    	}
    	System.out.println(ans);
    } main {
    	Scanner scan=new Scanner(System.in);
    	int n=scan.nextInt();
    	int k=scan.nextInt();
    	int a=0;
    	int b=0;
    	double c=0;
    	double ans=0;
    	for(int i=1;i<=n;i++){
    		a=i;
    		while(a<k) {
    			a*=2;
    			b++;
    		}
    		c=n*Math.pow(2, b);
    		ans+=1/c;
    		//System.out.println(c);
    		a=0;
    		b=0;
    		c=0;
    	}
    	System.out.println(ans);
    } Scanner scan=new Scanner(System.in); scan new Scanner(System.in) int n=scan.nextInt(); n scan.nextInt() scan.nextInt scan int k=scan.nextInt(); k scan.nextInt() scan.nextInt scan int a=0; a 0 int b=0; b 0 double c=0; c 0 double ans=0; ans 0 for(int i=1;i<=n;i++){
    		a=i;
    		while(a<k) {
    			a*=2;
    			b++;
    		}
    		c=n*Math.pow(2, b);
    		ans+=1/c;
    		//System.out.println(c);
    		a=0;
    		b=0;
    		c=0;
    	} int i=1; int i=1; i 1 i<=n i n i++ i++ i {
    		a=i;
    		while(a<k) {
    			a*=2;
    			b++;
    		}
    		c=n*Math.pow(2, b);
    		ans+=1/c;
    		//System.out.println(c);
    		a=0;
    		b=0;
    		c=0;
    	} {
    		a=i;
    		while(a<k) {
    			a*=2;
    			b++;
    		}
    		c=n*Math.pow(2, b);
    		ans+=1/c;
    		//System.out.println(c);
    		a=0;
    		b=0;
    		c=0;
    	} a=i a i while(a<k) {
    			a*=2;
    			b++;
    		} a<k a k {
    			a*=2;
    			b++;
    		} a*=2 a 2 b++ b c=n*Math.pow(2, b) c n*Math.pow(2, b) n Math.pow(2, b) Math.pow Math 2 b ans+=1/c ans 1/c 1 c a=0 a 0 b=0 b 0 c=0 c 0 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 scan=new Scanner(System.in);
    	int n=scan.nextInt();
    	int k=scan.nextInt();
    	int a=0;
    	int b=0;
    	double c=0;
    	double ans=0;
    	for(int i=1;i<=n;i++){
    		a=i;
    		while(a<k) {
    			a*=2;
    			b++;
    		}
    		c=n*Math.pow(2, b);
    		ans+=1/c;
    		//System.out.println(c);
    		a=0;
    		b=0;
    		c=0;
    	}
    	System.out.println(ans);
    }
} public class Main{
    public static void main(String [] args){
    	Scanner scan=new Scanner(System.in);
    	int n=scan.nextInt();
    	int k=scan.nextInt();
    	int a=0;
    	int b=0;
    	double c=0;
    	double ans=0;
    	for(int i=1;i<=n;i++){
    		a=i;
    		while(a<k) {
    			a*=2;
    			b++;
    		}
    		c=n*Math.pow(2, b);
    		ans+=1/c;
    		//System.out.println(c);
    		a=0;
    		b=0;
    		c=0;
    	}
    	System.out.println(ans);
    }
} Main
import java.util.Scanner;
//2-3
public class Main{
    public static void main(String [] args){
    	Scanner scan=new Scanner(System.in);
    	int n=scan.nextInt();
    	int k=scan.nextInt();
    	int a=0;
    	int b=0;
    	double c=0;
    	double ans=0;
    	for(int i=1;i<=n;i++){
    		a=i;
    		while(a<k) {
    			a*=2;
    			b++;
    		}
    		c=n*Math.pow(2, b);
    		ans+=1/c;
    		//System.out.println(c);
    		a=0;
    		b=0;
    		c=0;
    	}
    	System.out.println(ans);
    }
}