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();
	    sc.close();
	    double p = 0;
	      
	  double a = 1.0/n; 
	   for (int i=1; i<n+1; i++) {
		  int cn = i;
		   double t = a; 
		   while(cn<k) {
			     t = t*0.5;
			     cn= cn*2;
			    } 
		   
		   p = p+t ;
	   }
       System.out.println(p);
	}
} 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();
	    sc.close();
	    double p = 0;
	      
	  double a = 1.0/n; 
	   for (int i=1; i<n+1; i++) {
		  int cn = i;
		   double t = a; 
		   while(cn<k) {
			     t = t*0.5;
			     cn= cn*2;
			    } 
		   
		   p = p+t ;
	   }
       System.out.println(p);
	}
} Main public static void main(String[] args) {
     Scanner sc = new Scanner(System.in); 
		double n = sc.nextDouble();
	    double  k = sc.nextDouble();
	    sc.close();
	    double p = 0;
	      
	  double a = 1.0/n; 
	   for (int i=1; i<n+1; i++) {
		  int cn = i;
		   double t = a; 
		   while(cn<k) {
			     t = t*0.5;
			     cn= cn*2;
			    } 
		   
		   p = p+t ;
	   }
       System.out.println(p);
	} main {
     Scanner sc = new Scanner(System.in); 
		double n = sc.nextDouble();
	    double  k = sc.nextDouble();
	    sc.close();
	    double p = 0;
	      
	  double a = 1.0/n; 
	   for (int i=1; i<n+1; i++) {
		  int cn = i;
		   double t = a; 
		   while(cn<k) {
			     t = t*0.5;
			     cn= cn*2;
			    } 
		   
		   p = p+t ;
	   }
       System.out.println(p);
	} 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 sc.close() sc.close sc double p = 0; p 0 double a = 1.0/n; a 1.0/n 1.0 n for (int i=1; i<n+1; i++) {
		  int cn = i;
		   double t = a; 
		   while(cn<k) {
			     t = t*0.5;
			     cn= cn*2;
			    } 
		   
		   p = p+t ;
	   } int i=1; int i=1; i 1 i<n+1 i n+1 n 1 i++ i++ i {
		  int cn = i;
		   double t = a; 
		   while(cn<k) {
			     t = t*0.5;
			     cn= cn*2;
			    } 
		   
		   p = p+t ;
	   } {
		  int cn = i;
		   double t = a; 
		   while(cn<k) {
			     t = t*0.5;
			     cn= cn*2;
			    } 
		   
		   p = p+t ;
	   } int cn = i; cn i double t = a; t a while(cn<k) {
			     t = t*0.5;
			     cn= cn*2;
			    } cn<k cn k {
			     t = t*0.5;
			     cn= cn*2;
			    } t = t*0.5 t t*0.5 t 0.5 cn= cn*2 cn cn*2 cn 2 p = p+t p p+t p t System.out.println(p) System.out.println System.out System System.out p 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();
	    sc.close();
	    double p = 0;
	      
	  double a = 1.0/n; 
	   for (int i=1; i<n+1; i++) {
		  int cn = i;
		   double t = a; 
		   while(cn<k) {
			     t = t*0.5;
			     cn= cn*2;
			    } 
		   
		   p = p+t ;
	   }
       System.out.println(p);
	}
} public class Main {

	public static void main(String[] args) {
     Scanner sc = new Scanner(System.in); 
		double n = sc.nextDouble();
	    double  k = sc.nextDouble();
	    sc.close();
	    double p = 0;
	      
	  double a = 1.0/n; 
	   for (int i=1; i<n+1; i++) {
		  int cn = i;
		   double t = a; 
		   while(cn<k) {
			     t = t*0.5;
			     cn= cn*2;
			    } 
		   
		   p = p+t ;
	   }
       System.out.println(p);
	}
} 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();
	    sc.close();
	    double p = 0;
	      
	  double a = 1.0/n; 
	   for (int i=1; i<n+1; i++) {
		  int cn = i;
		   double t = a; 
		   while(cn<k) {
			     t = t*0.5;
			     cn= cn*2;
			    } 
		   
		   p = p+t ;
	   }
       System.out.println(p);
	}
}