import java.io.FileNotFoundException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();
		sc.close();

		int[] p = new int[N+1];
		for(int i=1;i<=N;i++) {
			int cnt = 0;
			int pdt = i;
			while(pdt<K) {
				pdt *= 2;
				cnt++;
			}
			p[i] = cnt;
		}
		long sum = 0;
		int max = p[1];
		for(int i=1;i<=N;i++) {
			sum += Math.pow(2, max-p[i]);
		}
		BigDecimal SUM = BigDecimal.valueOf(sum);
		BigDecimal P = BigDecimal.valueOf(Math.pow(2, max)*N);
		BigDecimal ans = SUM.divide(P,10,RoundingMode.HALF_UP);
		System.out.println(ans);
	}
} import java.io.FileNotFoundException; FileNotFoundException java.io import java.math.BigDecimal; BigDecimal java.math import java.math.RoundingMode; RoundingMode java.math import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();
		sc.close();

		int[] p = new int[N+1];
		for(int i=1;i<=N;i++) {
			int cnt = 0;
			int pdt = i;
			while(pdt<K) {
				pdt *= 2;
				cnt++;
			}
			p[i] = cnt;
		}
		long sum = 0;
		int max = p[1];
		for(int i=1;i<=N;i++) {
			sum += Math.pow(2, max-p[i]);
		}
		BigDecimal SUM = BigDecimal.valueOf(sum);
		BigDecimal P = BigDecimal.valueOf(Math.pow(2, max)*N);
		BigDecimal ans = SUM.divide(P,10,RoundingMode.HALF_UP);
		System.out.println(ans);
	}
} Main public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();
		sc.close();

		int[] p = new int[N+1];
		for(int i=1;i<=N;i++) {
			int cnt = 0;
			int pdt = i;
			while(pdt<K) {
				pdt *= 2;
				cnt++;
			}
			p[i] = cnt;
		}
		long sum = 0;
		int max = p[1];
		for(int i=1;i<=N;i++) {
			sum += Math.pow(2, max-p[i]);
		}
		BigDecimal SUM = BigDecimal.valueOf(sum);
		BigDecimal P = BigDecimal.valueOf(Math.pow(2, max)*N);
		BigDecimal ans = SUM.divide(P,10,RoundingMode.HALF_UP);
		System.out.println(ans);
	} main {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();
		sc.close();

		int[] p = new int[N+1];
		for(int i=1;i<=N;i++) {
			int cnt = 0;
			int pdt = i;
			while(pdt<K) {
				pdt *= 2;
				cnt++;
			}
			p[i] = cnt;
		}
		long sum = 0;
		int max = p[1];
		for(int i=1;i<=N;i++) {
			sum += Math.pow(2, max-p[i]);
		}
		BigDecimal SUM = BigDecimal.valueOf(sum);
		BigDecimal P = BigDecimal.valueOf(Math.pow(2, max)*N);
		BigDecimal ans = SUM.divide(P,10,RoundingMode.HALF_UP);
		System.out.println(ans);
	} 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 sc.close() sc.close sc int[] p = new int[N+1]; p new int[N+1] N+1 N 1 for(int i=1;i<=N;i++) {
			int cnt = 0;
			int pdt = i;
			while(pdt<K) {
				pdt *= 2;
				cnt++;
			}
			p[i] = cnt;
		} int i=1; int i=1; i 1 i<=N i N i++ i++ i {
			int cnt = 0;
			int pdt = i;
			while(pdt<K) {
				pdt *= 2;
				cnt++;
			}
			p[i] = cnt;
		} {
			int cnt = 0;
			int pdt = i;
			while(pdt<K) {
				pdt *= 2;
				cnt++;
			}
			p[i] = cnt;
		} int cnt = 0; cnt 0 int pdt = i; pdt i while(pdt<K) {
				pdt *= 2;
				cnt++;
			} pdt<K pdt K {
				pdt *= 2;
				cnt++;
			} pdt *= 2 pdt 2 cnt++ cnt p[i] = cnt p[i] p i cnt long sum = 0; sum 0 int max = p[1]; max p[1] p 1 for(int i=1;i<=N;i++) {
			sum += Math.pow(2, max-p[i]);
		} int i=1; int i=1; i 1 i<=N i N i++ i++ i {
			sum += Math.pow(2, max-p[i]);
		} {
			sum += Math.pow(2, max-p[i]);
		} sum += Math.pow(2, max-p[i]) sum Math.pow(2, max-p[i]) Math.pow Math 2 max-p[i] max p[i] p i BigDecimal SUM = BigDecimal.valueOf(sum); SUM BigDecimal.valueOf(sum) BigDecimal.valueOf BigDecimal sum BigDecimal P = BigDecimal.valueOf(Math.pow(2, max)*N); P BigDecimal.valueOf(Math.pow(2, max)*N) BigDecimal.valueOf BigDecimal Math.pow(2, max)*N Math.pow(2, max) Math.pow Math 2 max N BigDecimal ans = SUM.divide(P,10,RoundingMode.HALF_UP); ans SUM.divide(P,10,RoundingMode.HALF_UP) SUM.divide SUM P 10 RoundingMode.HALF_UP RoundingMode RoundingMode.HALF_UP 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) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();
		sc.close();

		int[] p = new int[N+1];
		for(int i=1;i<=N;i++) {
			int cnt = 0;
			int pdt = i;
			while(pdt<K) {
				pdt *= 2;
				cnt++;
			}
			p[i] = cnt;
		}
		long sum = 0;
		int max = p[1];
		for(int i=1;i<=N;i++) {
			sum += Math.pow(2, max-p[i]);
		}
		BigDecimal SUM = BigDecimal.valueOf(sum);
		BigDecimal P = BigDecimal.valueOf(Math.pow(2, max)*N);
		BigDecimal ans = SUM.divide(P,10,RoundingMode.HALF_UP);
		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();
		sc.close();

		int[] p = new int[N+1];
		for(int i=1;i<=N;i++) {
			int cnt = 0;
			int pdt = i;
			while(pdt<K) {
				pdt *= 2;
				cnt++;
			}
			p[i] = cnt;
		}
		long sum = 0;
		int max = p[1];
		for(int i=1;i<=N;i++) {
			sum += Math.pow(2, max-p[i]);
		}
		BigDecimal SUM = BigDecimal.valueOf(sum);
		BigDecimal P = BigDecimal.valueOf(Math.pow(2, max)*N);
		BigDecimal ans = SUM.divide(P,10,RoundingMode.HALF_UP);
		System.out.println(ans);
	}
} Main
import java.io.FileNotFoundException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();
		sc.close();

		int[] p = new int[N+1];
		for(int i=1;i<=N;i++) {
			int cnt = 0;
			int pdt = i;
			while(pdt<K) {
				pdt *= 2;
				cnt++;
			}
			p[i] = cnt;
		}
		long sum = 0;
		int max = p[1];
		for(int i=1;i<=N;i++) {
			sum += Math.pow(2, max-p[i]);
		}
		BigDecimal SUM = BigDecimal.valueOf(sum);
		BigDecimal P = BigDecimal.valueOf(Math.pow(2, max)*N);
		BigDecimal ans = SUM.divide(P,10,RoundingMode.HALF_UP);
		System.out.println(ans);
	}
}