import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(), k=sc.nextInt();
		int[] array = new int[n];
		for(int i=0;i<n;i++) {
			double least = (double)k/(i+1);
			least = Math.log(least)/Math.log(2.0);
			for(int j=0;;j++) {
				if(j>=least) {
					array[i]=j;
					break;
				}
			}
		}
		double sum =0.0;
		for(int i=0;i<n;i++) {
			sum += (double)1/power(2,array[i]);
		}
		System.out.printf("%.10f\n",(double)sum/n);
	}

	static int power(int tei, int ruijo) {
		int k=tei;
		if(ruijo==0) return 1;
		if(ruijo==1) return tei;
		for(int i=1;i<ruijo;i++) tei*=k;
		return tei;
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(), k=sc.nextInt();
		int[] array = new int[n];
		for(int i=0;i<n;i++) {
			double least = (double)k/(i+1);
			least = Math.log(least)/Math.log(2.0);
			for(int j=0;;j++) {
				if(j>=least) {
					array[i]=j;
					break;
				}
			}
		}
		double sum =0.0;
		for(int i=0;i<n;i++) {
			sum += (double)1/power(2,array[i]);
		}
		System.out.printf("%.10f\n",(double)sum/n);
	}

	static int power(int tei, int ruijo) {
		int k=tei;
		if(ruijo==0) return 1;
		if(ruijo==1) return tei;
		for(int i=1;i<ruijo;i++) tei*=k;
		return tei;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(), k=sc.nextInt();
		int[] array = new int[n];
		for(int i=0;i<n;i++) {
			double least = (double)k/(i+1);
			least = Math.log(least)/Math.log(2.0);
			for(int j=0;;j++) {
				if(j>=least) {
					array[i]=j;
					break;
				}
			}
		}
		double sum =0.0;
		for(int i=0;i<n;i++) {
			sum += (double)1/power(2,array[i]);
		}
		System.out.printf("%.10f\n",(double)sum/n);
	} main {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(), k=sc.nextInt();
		int[] array = new int[n];
		for(int i=0;i<n;i++) {
			double least = (double)k/(i+1);
			least = Math.log(least)/Math.log(2.0);
			for(int j=0;;j++) {
				if(j>=least) {
					array[i]=j;
					break;
				}
			}
		}
		double sum =0.0;
		for(int i=0;i<n;i++) {
			sum += (double)1/power(2,array[i]);
		}
		System.out.printf("%.10f\n",(double)sum/n);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt() n sc.nextInt() sc.nextInt sc k=sc.nextInt(); k sc.nextInt() sc.nextInt sc int[] array = new int[n]; array new int[n] n for(int i=0;i<n;i++) {
			double least = (double)k/(i+1);
			least = Math.log(least)/Math.log(2.0);
			for(int j=0;;j++) {
				if(j>=least) {
					array[i]=j;
					break;
				}
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			double least = (double)k/(i+1);
			least = Math.log(least)/Math.log(2.0);
			for(int j=0;;j++) {
				if(j>=least) {
					array[i]=j;
					break;
				}
			}
		} {
			double least = (double)k/(i+1);
			least = Math.log(least)/Math.log(2.0);
			for(int j=0;;j++) {
				if(j>=least) {
					array[i]=j;
					break;
				}
			}
		} double least = (double)k/(i+1); least (double)k/(i+1) (double)k (i+1) i 1 least = Math.log(least)/Math.log(2.0) least Math.log(least)/Math.log(2.0) Math.log(least) Math.log Math least Math.log(2.0) Math.log Math 2.0 for(int j=0;;j++) {
				if(j>=least) {
					array[i]=j;
					break;
				}
			} int j=0; int j=0; j 0 j++ j++ j {
				if(j>=least) {
					array[i]=j;
					break;
				}
			} {
				if(j>=least) {
					array[i]=j;
					break;
				}
			} if(j>=least) {
					array[i]=j;
					break;
				} j>=least j least {
					array[i]=j;
					break;
				} array[i]=j array[i] array i j break; double sum =0.0; sum 0.0 for(int i=0;i<n;i++) {
			sum += (double)1/power(2,array[i]);
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			sum += (double)1/power(2,array[i]);
		} {
			sum += (double)1/power(2,array[i]);
		} sum += (double)1/power(2,array[i]) sum (double)1/power(2,array[i]) (double)1 power(2,array[i]) power 2 array[i] array i System.out.printf("%.10f\n",(double)sum/n) System.out.printf System.out System System.out "%.10f\n" (double)sum/n (double)sum n String[] args args static int power(int tei, int ruijo) {
		int k=tei;
		if(ruijo==0) return 1;
		if(ruijo==1) return tei;
		for(int i=1;i<ruijo;i++) tei*=k;
		return tei;
	} power {
		int k=tei;
		if(ruijo==0) return 1;
		if(ruijo==1) return tei;
		for(int i=1;i<ruijo;i++) tei*=k;
		return tei;
	} int k=tei; k tei if(ruijo==0) return 1; ruijo==0 ruijo 0 return 1; 1 if(ruijo==1) return tei; ruijo==1 ruijo 1 return tei; tei for(int i=1;i<ruijo;i++) tei*=k; int i=1; int i=1; i 1 i<ruijo i ruijo i++ i++ i tei*=k; tei*=k tei k return tei; tei int tei tei int ruijo ruijo public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(), k=sc.nextInt();
		int[] array = new int[n];
		for(int i=0;i<n;i++) {
			double least = (double)k/(i+1);
			least = Math.log(least)/Math.log(2.0);
			for(int j=0;;j++) {
				if(j>=least) {
					array[i]=j;
					break;
				}
			}
		}
		double sum =0.0;
		for(int i=0;i<n;i++) {
			sum += (double)1/power(2,array[i]);
		}
		System.out.printf("%.10f\n",(double)sum/n);
	}

	static int power(int tei, int ruijo) {
		int k=tei;
		if(ruijo==0) return 1;
		if(ruijo==1) return tei;
		for(int i=1;i<ruijo;i++) tei*=k;
		return tei;
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(), k=sc.nextInt();
		int[] array = new int[n];
		for(int i=0;i<n;i++) {
			double least = (double)k/(i+1);
			least = Math.log(least)/Math.log(2.0);
			for(int j=0;;j++) {
				if(j>=least) {
					array[i]=j;
					break;
				}
			}
		}
		double sum =0.0;
		for(int i=0;i<n;i++) {
			sum += (double)1/power(2,array[i]);
		}
		System.out.printf("%.10f\n",(double)sum/n);
	}

	static int power(int tei, int ruijo) {
		int k=tei;
		if(ruijo==0) return 1;
		if(ruijo==1) return tei;
		for(int i=1;i<ruijo;i++) tei*=k;
		return tei;
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(), k=sc.nextInt();
		int[] array = new int[n];
		for(int i=0;i<n;i++) {
			double least = (double)k/(i+1);
			least = Math.log(least)/Math.log(2.0);
			for(int j=0;;j++) {
				if(j>=least) {
					array[i]=j;
					break;
				}
			}
		}
		double sum =0.0;
		for(int i=0;i<n;i++) {
			sum += (double)1/power(2,array[i]);
		}
		System.out.printf("%.10f\n",(double)sum/n);
	}

	static int power(int tei, int ruijo) {
		int k=tei;
		if(ruijo==0) return 1;
		if(ruijo==1) return tei;
		for(int i=1;i<ruijo;i++) tei*=k;
		return tei;
	}
}
