import java.util.*;
import static java.lang.Math.*;
import java.math.BigInteger;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		int k = sc.nextInt();
		
		// 計算
		double result = 0;
		double[] a = new double[n+1];
		double prod = 1;
		double sum = 0;

        for(int i = 1; i <= n; i++){
		    result += (double)1/pow(2, count(i, k));
		}
		result = result*1/n;

		// 出力
		System.out.println(result);
	}
	
	static long count(int i, int k){
	    if(i >= k){
	        return 0;
	    }else{
	        return count(i*2, k) + 1;
	    }
	}
	
	public static long pow(long a,long n) {
	    long res=1;
	    while (n>0) {
	        if ((n-n/2*2)==1) {
	            res=(res*a);
	        }
	        a=(a*a);
	        n>>=1;
	    }
	    return res;
	}
} import java.util.*; util.* java import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; import java.math.BigInteger; BigInteger java.math public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		int k = sc.nextInt();
		
		// 計算
		double result = 0;
		double[] a = new double[n+1];
		double prod = 1;
		double sum = 0;

        for(int i = 1; i <= n; i++){
		    result += (double)1/pow(2, count(i, k));
		}
		result = result*1/n;

		// 出力
		System.out.println(result);
	}
	
	static long count(int i, int k){
	    if(i >= k){
	        return 0;
	    }else{
	        return count(i*2, k) + 1;
	    }
	}
	
	public static long pow(long a,long n) {
	    long res=1;
	    while (n>0) {
	        if ((n-n/2*2)==1) {
	            res=(res*a);
	        }
	        a=(a*a);
	        n>>=1;
	    }
	    return res;
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		int k = sc.nextInt();
		
		// 計算
		double result = 0;
		double[] a = new double[n+1];
		double prod = 1;
		double sum = 0;

        for(int i = 1; i <= n; i++){
		    result += (double)1/pow(2, count(i, k));
		}
		result = result*1/n;

		// 出力
		System.out.println(result);
	} main {
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		int k = sc.nextInt();
		
		// 計算
		double result = 0;
		double[] a = new double[n+1];
		double prod = 1;
		double sum = 0;

        for(int i = 1; i <= n; i++){
		    result += (double)1/pow(2, count(i, k));
		}
		result = result*1/n;

		// 出力
		System.out.println(result);
	} 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 double result = 0; result 0 double[] a = new double[n+1]; a new double[n+1] n+1 n 1 double prod = 1; prod 1 double sum = 0; sum 0 for(int i = 1; i <= n; i++){
		    result += (double)1/pow(2, count(i, k));
		} int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
		    result += (double)1/pow(2, count(i, k));
		} {
		    result += (double)1/pow(2, count(i, k));
		} result += (double)1/pow(2, count(i, k)) result (double)1/pow(2, count(i, k)) (double)1 pow(2, count(i, k)) pow 2 count(i, k) count i k result = result*1/n result result*1/n result*1 result 1 n System.out.println(result) System.out.println System.out System System.out result String[] args args static long count(int i, int k){
	    if(i >= k){
	        return 0;
	    }else{
	        return count(i*2, k) + 1;
	    }
	} count {
	    if(i >= k){
	        return 0;
	    }else{
	        return count(i*2, k) + 1;
	    }
	} if(i >= k){
	        return 0;
	    }else{
	        return count(i*2, k) + 1;
	    } i >= k i k {
	        return 0;
	    } return 0; 0 {
	        return count(i*2, k) + 1;
	    } return count(i*2, k) + 1; count(i*2, k) + 1 count(i*2, k) count i*2 i 2 k 1 int i i int k k public static long pow(long a,long n) {
	    long res=1;
	    while (n>0) {
	        if ((n-n/2*2)==1) {
	            res=(res*a);
	        }
	        a=(a*a);
	        n>>=1;
	    }
	    return res;
	} pow {
	    long res=1;
	    while (n>0) {
	        if ((n-n/2*2)==1) {
	            res=(res*a);
	        }
	        a=(a*a);
	        n>>=1;
	    }
	    return res;
	} long res=1; res 1 while (n>0) {
	        if ((n-n/2*2)==1) {
	            res=(res*a);
	        }
	        a=(a*a);
	        n>>=1;
	    } n>0 n 0 {
	        if ((n-n/2*2)==1) {
	            res=(res*a);
	        }
	        a=(a*a);
	        n>>=1;
	    } if ((n-n/2*2)==1) {
	            res=(res*a);
	        } (n-n/2*2)==1 (n-n/2*2) n n/2*2 n/2 n 2 2 1 {
	            res=(res*a);
	        } res=(res*a) res (res*a) res a a=(a*a) a (a*a) a a n>>=1 n 1 return res; res long a a long n n public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		int k = sc.nextInt();
		
		// 計算
		double result = 0;
		double[] a = new double[n+1];
		double prod = 1;
		double sum = 0;

        for(int i = 1; i <= n; i++){
		    result += (double)1/pow(2, count(i, k));
		}
		result = result*1/n;

		// 出力
		System.out.println(result);
	}
	
	static long count(int i, int k){
	    if(i >= k){
	        return 0;
	    }else{
	        return count(i*2, k) + 1;
	    }
	}
	
	public static long pow(long a,long n) {
	    long res=1;
	    while (n>0) {
	        if ((n-n/2*2)==1) {
	            res=(res*a);
	        }
	        a=(a*a);
	        n>>=1;
	    }
	    return res;
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		int k = sc.nextInt();
		
		// 計算
		double result = 0;
		double[] a = new double[n+1];
		double prod = 1;
		double sum = 0;

        for(int i = 1; i <= n; i++){
		    result += (double)1/pow(2, count(i, k));
		}
		result = result*1/n;

		// 出力
		System.out.println(result);
	}
	
	static long count(int i, int k){
	    if(i >= k){
	        return 0;
	    }else{
	        return count(i*2, k) + 1;
	    }
	}
	
	public static long pow(long a,long n) {
	    long res=1;
	    while (n>0) {
	        if ((n-n/2*2)==1) {
	            res=(res*a);
	        }
	        a=(a*a);
	        n>>=1;
	    }
	    return res;
	}
} Main
import java.util.*;
import static java.lang.Math.*;
import java.math.BigInteger;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		int k = sc.nextInt();
		
		// 計算
		double result = 0;
		double[] a = new double[n+1];
		double prod = 1;
		double sum = 0;

        for(int i = 1; i <= n; i++){
		    result += (double)1/pow(2, count(i, k));
		}
		result = result*1/n;

		// 出力
		System.out.println(result);
	}
	
	static long count(int i, int k){
	    if(i >= k){
	        return 0;
	    }else{
	        return count(i*2, k) + 1;
	    }
	}
	
	public static long pow(long a,long n) {
	    long res=1;
	    while (n>0) {
	        if ((n-n/2*2)==1) {
	            res=(res*a);
	        }
	        a=(a*a);
	        n>>=1;
	    }
	    return res;
	}
}