import java.util.Scanner;

import org.omg.PortableServer.ID_ASSIGNMENT_POLICY_ID;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String string = sc.nextLine();
		
		String[] array = string.split(" ");
		Double[] array2 = new Double[2];
		for(int i=0; i<array.length; i++) {
				array2[i] = Double.parseDouble(array[i]);
		}
		Double[] r = new Double[]{1.0,2.0,4.0,8.0,16.0,32.0,64.0,128.0,256.0,512.0,1024.0,2048.0,4096.0,8192.0,16384.0,32768.0,65536.0};
		double ans = 0.0;
		for(int i=0; i<array2[0];i++) {
			Double a = array2[1] / (Double.parseDouble(String.valueOf(i))+1.0);
			int b = 17;
			for(int j=0; j<17; j++) {
				if(r[j] >= a) {
					b=j;
					break;
				}
			}
			ans += (1.0/array2[0])*(Math.pow(0.5,b));
		}
		System.out.println(ans);
	}

} import java.util.Scanner; Scanner java.util import org.omg.PortableServer.ID_ASSIGNMENT_POLICY_ID; ID_ASSIGNMENT_POLICY_ID org.omg.PortableServer public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String string = sc.nextLine();
		
		String[] array = string.split(" ");
		Double[] array2 = new Double[2];
		for(int i=0; i<array.length; i++) {
				array2[i] = Double.parseDouble(array[i]);
		}
		Double[] r = new Double[]{1.0,2.0,4.0,8.0,16.0,32.0,64.0,128.0,256.0,512.0,1024.0,2048.0,4096.0,8192.0,16384.0,32768.0,65536.0};
		double ans = 0.0;
		for(int i=0; i<array2[0];i++) {
			Double a = array2[1] / (Double.parseDouble(String.valueOf(i))+1.0);
			int b = 17;
			for(int j=0; j<17; j++) {
				if(r[j] >= a) {
					b=j;
					break;
				}
			}
			ans += (1.0/array2[0])*(Math.pow(0.5,b));
		}
		System.out.println(ans);
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String string = sc.nextLine();
		
		String[] array = string.split(" ");
		Double[] array2 = new Double[2];
		for(int i=0; i<array.length; i++) {
				array2[i] = Double.parseDouble(array[i]);
		}
		Double[] r = new Double[]{1.0,2.0,4.0,8.0,16.0,32.0,64.0,128.0,256.0,512.0,1024.0,2048.0,4096.0,8192.0,16384.0,32768.0,65536.0};
		double ans = 0.0;
		for(int i=0; i<array2[0];i++) {
			Double a = array2[1] / (Double.parseDouble(String.valueOf(i))+1.0);
			int b = 17;
			for(int j=0; j<17; j++) {
				if(r[j] >= a) {
					b=j;
					break;
				}
			}
			ans += (1.0/array2[0])*(Math.pow(0.5,b));
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		String string = sc.nextLine();
		
		String[] array = string.split(" ");
		Double[] array2 = new Double[2];
		for(int i=0; i<array.length; i++) {
				array2[i] = Double.parseDouble(array[i]);
		}
		Double[] r = new Double[]{1.0,2.0,4.0,8.0,16.0,32.0,64.0,128.0,256.0,512.0,1024.0,2048.0,4096.0,8192.0,16384.0,32768.0,65536.0};
		double ans = 0.0;
		for(int i=0; i<array2[0];i++) {
			Double a = array2[1] / (Double.parseDouble(String.valueOf(i))+1.0);
			int b = 17;
			for(int j=0; j<17; j++) {
				if(r[j] >= a) {
					b=j;
					break;
				}
			}
			ans += (1.0/array2[0])*(Math.pow(0.5,b));
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String string = sc.nextLine(); string sc.nextLine() sc.nextLine sc String[] array = string.split(" "); array string.split(" ") string.split string " " Double[] array2 = new Double[2]; array2 new Double[2] 2 for(int i=0; i<array.length; i++) {
				array2[i] = Double.parseDouble(array[i]);
		} int i=0; int i=0; i 0 i<array.length i array.length array array.length i++ i++ i {
				array2[i] = Double.parseDouble(array[i]);
		} {
				array2[i] = Double.parseDouble(array[i]);
		} array2[i] = Double.parseDouble(array[i]) array2[i] array2 i Double.parseDouble(array[i]) Double.parseDouble Double array[i] array i Double[] r = new Double[]{1.0,2.0,4.0,8.0,16.0,32.0,64.0,128.0,256.0,512.0,1024.0,2048.0,4096.0,8192.0,16384.0,32768.0,65536.0}; r new Double[]{1.0,2.0,4.0,8.0,16.0,32.0,64.0,128.0,256.0,512.0,1024.0,2048.0,4096.0,8192.0,16384.0,32768.0,65536.0} double ans = 0.0; ans 0.0 for(int i=0; i<array2[0];i++) {
			Double a = array2[1] / (Double.parseDouble(String.valueOf(i))+1.0);
			int b = 17;
			for(int j=0; j<17; j++) {
				if(r[j] >= a) {
					b=j;
					break;
				}
			}
			ans += (1.0/array2[0])*(Math.pow(0.5,b));
		} int i=0; int i=0; i 0 i<array2[0] i array2[0] array2 0 i++ i++ i {
			Double a = array2[1] / (Double.parseDouble(String.valueOf(i))+1.0);
			int b = 17;
			for(int j=0; j<17; j++) {
				if(r[j] >= a) {
					b=j;
					break;
				}
			}
			ans += (1.0/array2[0])*(Math.pow(0.5,b));
		} {
			Double a = array2[1] / (Double.parseDouble(String.valueOf(i))+1.0);
			int b = 17;
			for(int j=0; j<17; j++) {
				if(r[j] >= a) {
					b=j;
					break;
				}
			}
			ans += (1.0/array2[0])*(Math.pow(0.5,b));
		} Double a = array2[1] / (Double.parseDouble(String.valueOf(i))+1.0); a array2[1] / (Double.parseDouble(String.valueOf(i))+1.0) array2[1] array2 1 (Double.parseDouble(String.valueOf(i))+1.0) Double.parseDouble(String.valueOf(i)) Double.parseDouble Double String.valueOf(i) String.valueOf String i 1.0 int b = 17; b 17 for(int j=0; j<17; j++) {
				if(r[j] >= a) {
					b=j;
					break;
				}
			} int j=0; int j=0; j 0 j<17 j 17 j++ j++ j {
				if(r[j] >= a) {
					b=j;
					break;
				}
			} {
				if(r[j] >= a) {
					b=j;
					break;
				}
			} if(r[j] >= a) {
					b=j;
					break;
				} r[j] >= a r[j] r j a {
					b=j;
					break;
				} b=j b j break; ans += (1.0/array2[0])*(Math.pow(0.5,b)) ans (1.0/array2[0])*(Math.pow(0.5,b)) (1.0/array2[0]) 1.0 array2[0] array2 0 (Math.pow(0.5,b)) Math.pow Math 0.5 b 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) {
		Scanner sc = new Scanner(System.in);
		String string = sc.nextLine();
		
		String[] array = string.split(" ");
		Double[] array2 = new Double[2];
		for(int i=0; i<array.length; i++) {
				array2[i] = Double.parseDouble(array[i]);
		}
		Double[] r = new Double[]{1.0,2.0,4.0,8.0,16.0,32.0,64.0,128.0,256.0,512.0,1024.0,2048.0,4096.0,8192.0,16384.0,32768.0,65536.0};
		double ans = 0.0;
		for(int i=0; i<array2[0];i++) {
			Double a = array2[1] / (Double.parseDouble(String.valueOf(i))+1.0);
			int b = 17;
			for(int j=0; j<17; j++) {
				if(r[j] >= a) {
					b=j;
					break;
				}
			}
			ans += (1.0/array2[0])*(Math.pow(0.5,b));
		}
		System.out.println(ans);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String string = sc.nextLine();
		
		String[] array = string.split(" ");
		Double[] array2 = new Double[2];
		for(int i=0; i<array.length; i++) {
				array2[i] = Double.parseDouble(array[i]);
		}
		Double[] r = new Double[]{1.0,2.0,4.0,8.0,16.0,32.0,64.0,128.0,256.0,512.0,1024.0,2048.0,4096.0,8192.0,16384.0,32768.0,65536.0};
		double ans = 0.0;
		for(int i=0; i<array2[0];i++) {
			Double a = array2[1] / (Double.parseDouble(String.valueOf(i))+1.0);
			int b = 17;
			for(int j=0; j<17; j++) {
				if(r[j] >= a) {
					b=j;
					break;
				}
			}
			ans += (1.0/array2[0])*(Math.pow(0.5,b));
		}
		System.out.println(ans);
	}

} Main
import java.util.Scanner;

import org.omg.PortableServer.ID_ASSIGNMENT_POLICY_ID;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String string = sc.nextLine();
		
		String[] array = string.split(" ");
		Double[] array2 = new Double[2];
		for(int i=0; i<array.length; i++) {
				array2[i] = Double.parseDouble(array[i]);
		}
		Double[] r = new Double[]{1.0,2.0,4.0,8.0,16.0,32.0,64.0,128.0,256.0,512.0,1024.0,2048.0,4096.0,8192.0,16384.0,32768.0,65536.0};
		double ans = 0.0;
		for(int i=0; i<array2[0];i++) {
			Double a = array2[1] / (Double.parseDouble(String.valueOf(i))+1.0);
			int b = 17;
			for(int j=0; j<17; j++) {
				if(r[j] >= a) {
					b=j;
					break;
				}
			}
			ans += (1.0/array2[0])*(Math.pow(0.5,b));
		}
		System.out.println(ans);
	}

}
