import java.util.Scanner;

public class Main {


	public static final long pow(long x, long n) {
	    long sum = 1;
	    while (n > 0) {
	        if ((n & 1) == 1) {
	            sum *= x;
	        }
	        x *= x;
	        n >>= 1;
	    }
	    return sum;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int men = sc.nextInt();
		int mokuhyo = sc.nextInt();
		double answer=0;
		double dicekakuritu = (double)1 / men;
		for (int i = 1; i <= men; i++) {

			int coinnum = 0;
			int value = i;
			while (value < mokuhyo) {
				value *=2;
				coinnum++;
			}
			if(coinnum==0) {
				answer+=dicekakuritu;
			}else {
			double coinkakuritu =(double)1/ pow(2, coinnum);
			answer+=dicekakuritu*coinkakuritu;
			}
		}
		System.out.println(answer);
	}


}
 import java.util.Scanner; Scanner java.util public class Main {


	public static final long pow(long x, long n) {
	    long sum = 1;
	    while (n > 0) {
	        if ((n & 1) == 1) {
	            sum *= x;
	        }
	        x *= x;
	        n >>= 1;
	    }
	    return sum;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int men = sc.nextInt();
		int mokuhyo = sc.nextInt();
		double answer=0;
		double dicekakuritu = (double)1 / men;
		for (int i = 1; i <= men; i++) {

			int coinnum = 0;
			int value = i;
			while (value < mokuhyo) {
				value *=2;
				coinnum++;
			}
			if(coinnum==0) {
				answer+=dicekakuritu;
			}else {
			double coinkakuritu =(double)1/ pow(2, coinnum);
			answer+=dicekakuritu*coinkakuritu;
			}
		}
		System.out.println(answer);
	}


} Main public static final long pow(long x, long n) {
	    long sum = 1;
	    while (n > 0) {
	        if ((n & 1) == 1) {
	            sum *= x;
	        }
	        x *= x;
	        n >>= 1;
	    }
	    return sum;
	} pow {
	    long sum = 1;
	    while (n > 0) {
	        if ((n & 1) == 1) {
	            sum *= x;
	        }
	        x *= x;
	        n >>= 1;
	    }
	    return sum;
	} long sum = 1; sum 1 while (n > 0) {
	        if ((n & 1) == 1) {
	            sum *= x;
	        }
	        x *= x;
	        n >>= 1;
	    } n > 0 n 0 {
	        if ((n & 1) == 1) {
	            sum *= x;
	        }
	        x *= x;
	        n >>= 1;
	    } if ((n & 1) == 1) {
	            sum *= x;
	        } (n & 1) == 1 (n & 1) n 1 1 {
	            sum *= x;
	        } sum *= x sum x x *= x x x n >>= 1 n 1 return sum; sum long x x long n n public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int men = sc.nextInt();
		int mokuhyo = sc.nextInt();
		double answer=0;
		double dicekakuritu = (double)1 / men;
		for (int i = 1; i <= men; i++) {

			int coinnum = 0;
			int value = i;
			while (value < mokuhyo) {
				value *=2;
				coinnum++;
			}
			if(coinnum==0) {
				answer+=dicekakuritu;
			}else {
			double coinkakuritu =(double)1/ pow(2, coinnum);
			answer+=dicekakuritu*coinkakuritu;
			}
		}
		System.out.println(answer);
	} main {
		Scanner sc = new Scanner(System.in);
		int men = sc.nextInt();
		int mokuhyo = sc.nextInt();
		double answer=0;
		double dicekakuritu = (double)1 / men;
		for (int i = 1; i <= men; i++) {

			int coinnum = 0;
			int value = i;
			while (value < mokuhyo) {
				value *=2;
				coinnum++;
			}
			if(coinnum==0) {
				answer+=dicekakuritu;
			}else {
			double coinkakuritu =(double)1/ pow(2, coinnum);
			answer+=dicekakuritu*coinkakuritu;
			}
		}
		System.out.println(answer);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int men = sc.nextInt(); men sc.nextInt() sc.nextInt sc int mokuhyo = sc.nextInt(); mokuhyo sc.nextInt() sc.nextInt sc double answer=0; answer 0 double dicekakuritu = (double)1 / men; dicekakuritu (double)1 / men (double)1 men for (int i = 1; i <= men; i++) {

			int coinnum = 0;
			int value = i;
			while (value < mokuhyo) {
				value *=2;
				coinnum++;
			}
			if(coinnum==0) {
				answer+=dicekakuritu;
			}else {
			double coinkakuritu =(double)1/ pow(2, coinnum);
			answer+=dicekakuritu*coinkakuritu;
			}
		} int i = 1; int i = 1; i 1 i <= men i men i++ i++ i {

			int coinnum = 0;
			int value = i;
			while (value < mokuhyo) {
				value *=2;
				coinnum++;
			}
			if(coinnum==0) {
				answer+=dicekakuritu;
			}else {
			double coinkakuritu =(double)1/ pow(2, coinnum);
			answer+=dicekakuritu*coinkakuritu;
			}
		} {

			int coinnum = 0;
			int value = i;
			while (value < mokuhyo) {
				value *=2;
				coinnum++;
			}
			if(coinnum==0) {
				answer+=dicekakuritu;
			}else {
			double coinkakuritu =(double)1/ pow(2, coinnum);
			answer+=dicekakuritu*coinkakuritu;
			}
		} int coinnum = 0; coinnum 0 int value = i; value i while (value < mokuhyo) {
				value *=2;
				coinnum++;
			} value < mokuhyo value mokuhyo {
				value *=2;
				coinnum++;
			} value *=2 value 2 coinnum++ coinnum if(coinnum==0) {
				answer+=dicekakuritu;
			}else {
			double coinkakuritu =(double)1/ pow(2, coinnum);
			answer+=dicekakuritu*coinkakuritu;
			} coinnum==0 coinnum 0 {
				answer+=dicekakuritu;
			} answer+=dicekakuritu answer dicekakuritu {
			double coinkakuritu =(double)1/ pow(2, coinnum);
			answer+=dicekakuritu*coinkakuritu;
			} double coinkakuritu =(double)1/ pow(2, coinnum); coinkakuritu (double)1/ pow(2, coinnum) (double)1 pow(2, coinnum) pow 2 coinnum answer+=dicekakuritu*coinkakuritu answer dicekakuritu*coinkakuritu dicekakuritu coinkakuritu System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {


	public static final long pow(long x, long n) {
	    long sum = 1;
	    while (n > 0) {
	        if ((n & 1) == 1) {
	            sum *= x;
	        }
	        x *= x;
	        n >>= 1;
	    }
	    return sum;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int men = sc.nextInt();
		int mokuhyo = sc.nextInt();
		double answer=0;
		double dicekakuritu = (double)1 / men;
		for (int i = 1; i <= men; i++) {

			int coinnum = 0;
			int value = i;
			while (value < mokuhyo) {
				value *=2;
				coinnum++;
			}
			if(coinnum==0) {
				answer+=dicekakuritu;
			}else {
			double coinkakuritu =(double)1/ pow(2, coinnum);
			answer+=dicekakuritu*coinkakuritu;
			}
		}
		System.out.println(answer);
	}


} public class Main {


	public static final long pow(long x, long n) {
	    long sum = 1;
	    while (n > 0) {
	        if ((n & 1) == 1) {
	            sum *= x;
	        }
	        x *= x;
	        n >>= 1;
	    }
	    return sum;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int men = sc.nextInt();
		int mokuhyo = sc.nextInt();
		double answer=0;
		double dicekakuritu = (double)1 / men;
		for (int i = 1; i <= men; i++) {

			int coinnum = 0;
			int value = i;
			while (value < mokuhyo) {
				value *=2;
				coinnum++;
			}
			if(coinnum==0) {
				answer+=dicekakuritu;
			}else {
			double coinkakuritu =(double)1/ pow(2, coinnum);
			answer+=dicekakuritu*coinkakuritu;
			}
		}
		System.out.println(answer);
	}


} Main
import java.util.Scanner;

public class Main {


	public static final long pow(long x, long n) {
	    long sum = 1;
	    while (n > 0) {
	        if ((n & 1) == 1) {
	            sum *= x;
	        }
	        x *= x;
	        n >>= 1;
	    }
	    return sum;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int men = sc.nextInt();
		int mokuhyo = sc.nextInt();
		double answer=0;
		double dicekakuritu = (double)1 / men;
		for (int i = 1; i <= men; i++) {

			int coinnum = 0;
			int value = i;
			while (value < mokuhyo) {
				value *=2;
				coinnum++;
			}
			if(coinnum==0) {
				answer+=dicekakuritu;
			}else {
			double coinkakuritu =(double)1/ pow(2, coinnum);
			answer+=dicekakuritu*coinkakuritu;
			}
		}
		System.out.println(answer);
	}


}

