import java.util.*;
import java.io.*;

public class Main {
	public static long MCD_Euclides(long long1, long ab){
	    while(ab != 0){
	         long t = ab;
	         ab = long1 % ab;
	         long1 = t;
	    }
	    return long1;
	}
	public static void main(String[] args) {
		FastScanner br = new FastScanner();
		ArrayList<Long> caca2 = new ArrayList<Long>();
		PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));
		int n1 = br.ni();
		int n2 = br.ni();
		for(int i=1;i<=n1;i++) {
			int cont = 0;
			int n = i;
			while(n<n2){
				cont++;
				n*=2;
			}
			caca2.add((long) (Math.pow(2, cont)*n1));
		}
		int arr = 1;
		long ab = caca2.get(0);
		for(int i=1;i<n1;i++) {
			if(caca2.get(i)==3)continue;
			if(ab>=caca2.get(i)) arr+=ab/caca2.get(i);
			else arr+=caca2.get(i)/ab;
		}
		System.out.println((double)arr/(double)ab);
		pw.close();
	}
}

class FastScanner {
	BufferedReader br;
	StringTokenizer st;

	public FastScanner(String s) {
		try {
			br = new BufferedReader(new FileReader(s));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
	}

	public FastScanner() {
		br = new BufferedReader(new InputStreamReader(System.in));
	}

	ArrayList<Integer>[] ng(int n, int e) {
		ArrayList<Integer>[] adj = new ArrayList[n];
		for (int i = 0; i < n; i++) {
			adj[i] = new ArrayList<Integer>();
		}
		for (int i = 0; i < e; i++) {
			int a = ni() - 1;
			int b = ni() - 1;
			adj[a].add(b);
			adj[b].add(a);
		}
		return adj;
	}

	Integer[] nIa(int n) {
		Integer[] arr = new Integer[n];
		for (int i = 0; i < n; i++) {
			arr[i] = ni();
		}
		return arr;
	}

	int[] nia(int n) {
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = ni();
		}
		return arr;
	}

	Long[] nLa(int n) {
		Long[] arr = new Long[n];
		for (int i = 0; i < n; i++) {
			arr[i] = nl();
		}
		return arr;
	}

	long[] nla(int n) {
		long[] arr = new long[n];
		for (int i = 0; i < n; i++) {
			arr[i] = nl();
		}
		return arr;
	}

	String[] nsa(int n) {
		String[] arr = new String[n];
		for (int i = 0; i < n; i++) {
			arr[i] = nt();
		}
		return arr;
	}

	String nt() {
		while (st == null || !st.hasMoreElements()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return st.nextToken();
	}

	int ni() {
		return Integer.parseInt(nt());
	}

	long nl() {
		return Long.parseLong(nt());
	}

	double nd() {
		return Double.parseDouble(nt());
	}

} import java.util.*; util.* java import java.io.*; io.* java public class Main {
	public static long MCD_Euclides(long long1, long ab){
	    while(ab != 0){
	         long t = ab;
	         ab = long1 % ab;
	         long1 = t;
	    }
	    return long1;
	}
	public static void main(String[] args) {
		FastScanner br = new FastScanner();
		ArrayList<Long> caca2 = new ArrayList<Long>();
		PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));
		int n1 = br.ni();
		int n2 = br.ni();
		for(int i=1;i<=n1;i++) {
			int cont = 0;
			int n = i;
			while(n<n2){
				cont++;
				n*=2;
			}
			caca2.add((long) (Math.pow(2, cont)*n1));
		}
		int arr = 1;
		long ab = caca2.get(0);
		for(int i=1;i<n1;i++) {
			if(caca2.get(i)==3)continue;
			if(ab>=caca2.get(i)) arr+=ab/caca2.get(i);
			else arr+=caca2.get(i)/ab;
		}
		System.out.println((double)arr/(double)ab);
		pw.close();
	}
} Main public static long MCD_Euclides(long long1, long ab){
	    while(ab != 0){
	         long t = ab;
	         ab = long1 % ab;
	         long1 = t;
	    }
	    return long1;
	} MCD_Euclides {
	    while(ab != 0){
	         long t = ab;
	         ab = long1 % ab;
	         long1 = t;
	    }
	    return long1;
	} while(ab != 0){
	         long t = ab;
	         ab = long1 % ab;
	         long1 = t;
	    } ab != 0 ab 0 {
	         long t = ab;
	         ab = long1 % ab;
	         long1 = t;
	    } long t = ab; t ab ab = long1 % ab ab long1 % ab long1 ab long1 = t long1 t return long1; long1 long long1 long1 long ab ab public static void main(String[] args) {
		FastScanner br = new FastScanner();
		ArrayList<Long> caca2 = new ArrayList<Long>();
		PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));
		int n1 = br.ni();
		int n2 = br.ni();
		for(int i=1;i<=n1;i++) {
			int cont = 0;
			int n = i;
			while(n<n2){
				cont++;
				n*=2;
			}
			caca2.add((long) (Math.pow(2, cont)*n1));
		}
		int arr = 1;
		long ab = caca2.get(0);
		for(int i=1;i<n1;i++) {
			if(caca2.get(i)==3)continue;
			if(ab>=caca2.get(i)) arr+=ab/caca2.get(i);
			else arr+=caca2.get(i)/ab;
		}
		System.out.println((double)arr/(double)ab);
		pw.close();
	} main {
		FastScanner br = new FastScanner();
		ArrayList<Long> caca2 = new ArrayList<Long>();
		PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));
		int n1 = br.ni();
		int n2 = br.ni();
		for(int i=1;i<=n1;i++) {
			int cont = 0;
			int n = i;
			while(n<n2){
				cont++;
				n*=2;
			}
			caca2.add((long) (Math.pow(2, cont)*n1));
		}
		int arr = 1;
		long ab = caca2.get(0);
		for(int i=1;i<n1;i++) {
			if(caca2.get(i)==3)continue;
			if(ab>=caca2.get(i)) arr+=ab/caca2.get(i);
			else arr+=caca2.get(i)/ab;
		}
		System.out.println((double)arr/(double)ab);
		pw.close();
	} FastScanner br = new FastScanner(); br new FastScanner() ArrayList<Long> caca2 = new ArrayList<Long>(); caca2 new ArrayList<Long>() PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out)); pw new PrintWriter(new OutputStreamWriter(System.out)) int n1 = br.ni(); n1 br.ni() br.ni br int n2 = br.ni(); n2 br.ni() br.ni br for(int i=1;i<=n1;i++) {
			int cont = 0;
			int n = i;
			while(n<n2){
				cont++;
				n*=2;
			}
			caca2.add((long) (Math.pow(2, cont)*n1));
		} int i=1; int i=1; i 1 i<=n1 i n1 i++ i++ i {
			int cont = 0;
			int n = i;
			while(n<n2){
				cont++;
				n*=2;
			}
			caca2.add((long) (Math.pow(2, cont)*n1));
		} {
			int cont = 0;
			int n = i;
			while(n<n2){
				cont++;
				n*=2;
			}
			caca2.add((long) (Math.pow(2, cont)*n1));
		} int cont = 0; cont 0 int n = i; n i while(n<n2){
				cont++;
				n*=2;
			} n<n2 n n2 {
				cont++;
				n*=2;
			} cont++ cont n*=2 n 2 caca2.add((long) (Math.pow(2, cont)*n1)) caca2.add caca2 (long) (Math.pow(2, cont)*n1) Math.pow(2, cont) Math.pow Math 2 cont n1 int arr = 1; arr 1 long ab = caca2.get(0); ab caca2.get(0) caca2.get caca2 0 for(int i=1;i<n1;i++) {
			if(caca2.get(i)==3)continue;
			if(ab>=caca2.get(i)) arr+=ab/caca2.get(i);
			else arr+=caca2.get(i)/ab;
		} int i=1; int i=1; i 1 i<n1 i n1 i++ i++ i {
			if(caca2.get(i)==3)continue;
			if(ab>=caca2.get(i)) arr+=ab/caca2.get(i);
			else arr+=caca2.get(i)/ab;
		} {
			if(caca2.get(i)==3)continue;
			if(ab>=caca2.get(i)) arr+=ab/caca2.get(i);
			else arr+=caca2.get(i)/ab;
		} if(caca2.get(i)==3)continue; caca2.get(i)==3 caca2.get(i) caca2.get caca2 i 3 continue; if(ab>=caca2.get(i)) arr+=ab/caca2.get(i);
			else arr+=caca2.get(i)/ab; ab>=caca2.get(i) ab caca2.get(i) caca2.get caca2 i arr+=ab/caca2.get(i) arr ab/caca2.get(i) ab caca2.get(i) caca2.get caca2 i arr+=caca2.get(i)/ab arr caca2.get(i)/ab caca2.get(i) caca2.get caca2 i ab System.out.println((double)arr/(double)ab) System.out.println System.out System System.out (double)arr/(double)ab (double)arr (double)ab pw.close() pw.close pw String[] args args class FastScanner {
	BufferedReader br;
	StringTokenizer st;

	public FastScanner(String s) {
		try {
			br = new BufferedReader(new FileReader(s));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
	}

	public FastScanner() {
		br = new BufferedReader(new InputStreamReader(System.in));
	}

	ArrayList<Integer>[] ng(int n, int e) {
		ArrayList<Integer>[] adj = new ArrayList[n];
		for (int i = 0; i < n; i++) {
			adj[i] = new ArrayList<Integer>();
		}
		for (int i = 0; i < e; i++) {
			int a = ni() - 1;
			int b = ni() - 1;
			adj[a].add(b);
			adj[b].add(a);
		}
		return adj;
	}

	Integer[] nIa(int n) {
		Integer[] arr = new Integer[n];
		for (int i = 0; i < n; i++) {
			arr[i] = ni();
		}
		return arr;
	}

	int[] nia(int n) {
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = ni();
		}
		return arr;
	}

	Long[] nLa(int n) {
		Long[] arr = new Long[n];
		for (int i = 0; i < n; i++) {
			arr[i] = nl();
		}
		return arr;
	}

	long[] nla(int n) {
		long[] arr = new long[n];
		for (int i = 0; i < n; i++) {
			arr[i] = nl();
		}
		return arr;
	}

	String[] nsa(int n) {
		String[] arr = new String[n];
		for (int i = 0; i < n; i++) {
			arr[i] = nt();
		}
		return arr;
	}

	String nt() {
		while (st == null || !st.hasMoreElements()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return st.nextToken();
	}

	int ni() {
		return Integer.parseInt(nt());
	}

	long nl() {
		return Long.parseLong(nt());
	}

	double nd() {
		return Double.parseDouble(nt());
	}

} FastScanner BufferedReader br; br StringTokenizer st; st public FastScanner(String s) {
		try {
			br = new BufferedReader(new FileReader(s));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
	} FastScanner {
		try {
			br = new BufferedReader(new FileReader(s));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
	} try {
			br = new BufferedReader(new FileReader(s));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} FileNotFoundException e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			br = new BufferedReader(new FileReader(s));
		} br = new BufferedReader(new FileReader(s)) br new BufferedReader(new FileReader(s)) String s s public FastScanner() {
		br = new BufferedReader(new InputStreamReader(System.in));
	} FastScanner {
		br = new BufferedReader(new InputStreamReader(System.in));
	} br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) ArrayList<Integer>[] ng(int n, int e) {
		ArrayList<Integer>[] adj = new ArrayList[n];
		for (int i = 0; i < n; i++) {
			adj[i] = new ArrayList<Integer>();
		}
		for (int i = 0; i < e; i++) {
			int a = ni() - 1;
			int b = ni() - 1;
			adj[a].add(b);
			adj[b].add(a);
		}
		return adj;
	} ng {
		ArrayList<Integer>[] adj = new ArrayList[n];
		for (int i = 0; i < n; i++) {
			adj[i] = new ArrayList<Integer>();
		}
		for (int i = 0; i < e; i++) {
			int a = ni() - 1;
			int b = ni() - 1;
			adj[a].add(b);
			adj[b].add(a);
		}
		return adj;
	} ArrayList<Integer>[] adj = new ArrayList[n]; adj new ArrayList[n] n for (int i = 0; i < n; i++) {
			adj[i] = new ArrayList<Integer>();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			adj[i] = new ArrayList<Integer>();
		} {
			adj[i] = new ArrayList<Integer>();
		} adj[i] = new ArrayList<Integer>() adj[i] adj i new ArrayList<Integer>() for (int i = 0; i < e; i++) {
			int a = ni() - 1;
			int b = ni() - 1;
			adj[a].add(b);
			adj[b].add(a);
		} int i = 0; int i = 0; i 0 i < e i e i++ i++ i {
			int a = ni() - 1;
			int b = ni() - 1;
			adj[a].add(b);
			adj[b].add(a);
		} {
			int a = ni() - 1;
			int b = ni() - 1;
			adj[a].add(b);
			adj[b].add(a);
		} int a = ni() - 1; a ni() - 1 ni() ni 1 int b = ni() - 1; b ni() - 1 ni() ni 1 adj[a].add(b) adj[a].add adj[a] adj a b adj[b].add(a) adj[b].add adj[b] adj b a return adj; adj int n n int e e Integer[] nIa(int n) {
		Integer[] arr = new Integer[n];
		for (int i = 0; i < n; i++) {
			arr[i] = ni();
		}
		return arr;
	} nIa {
		Integer[] arr = new Integer[n];
		for (int i = 0; i < n; i++) {
			arr[i] = ni();
		}
		return arr;
	} Integer[] arr = new Integer[n]; arr new Integer[n] n for (int i = 0; i < n; i++) {
			arr[i] = ni();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			arr[i] = ni();
		} {
			arr[i] = ni();
		} arr[i] = ni() arr[i] arr i ni() ni return arr; arr int n n int[] nia(int n) {
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = ni();
		}
		return arr;
	} nia {
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = ni();
		}
		return arr;
	} int[] arr = new int[n]; arr new int[n] n for (int i = 0; i < n; i++) {
			arr[i] = ni();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			arr[i] = ni();
		} {
			arr[i] = ni();
		} arr[i] = ni() arr[i] arr i ni() ni return arr; arr int n n Long[] nLa(int n) {
		Long[] arr = new Long[n];
		for (int i = 0; i < n; i++) {
			arr[i] = nl();
		}
		return arr;
	} nLa {
		Long[] arr = new Long[n];
		for (int i = 0; i < n; i++) {
			arr[i] = nl();
		}
		return arr;
	} Long[] arr = new Long[n]; arr new Long[n] n for (int i = 0; i < n; i++) {
			arr[i] = nl();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			arr[i] = nl();
		} {
			arr[i] = nl();
		} arr[i] = nl() arr[i] arr i nl() nl return arr; arr int n n long[] nla(int n) {
		long[] arr = new long[n];
		for (int i = 0; i < n; i++) {
			arr[i] = nl();
		}
		return arr;
	} nla {
		long[] arr = new long[n];
		for (int i = 0; i < n; i++) {
			arr[i] = nl();
		}
		return arr;
	} long[] arr = new long[n]; arr new long[n] n for (int i = 0; i < n; i++) {
			arr[i] = nl();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			arr[i] = nl();
		} {
			arr[i] = nl();
		} arr[i] = nl() arr[i] arr i nl() nl return arr; arr int n n String[] nsa(int n) {
		String[] arr = new String[n];
		for (int i = 0; i < n; i++) {
			arr[i] = nt();
		}
		return arr;
	} nsa {
		String[] arr = new String[n];
		for (int i = 0; i < n; i++) {
			arr[i] = nt();
		}
		return arr;
	} String[] arr = new String[n]; arr new String[n] n for (int i = 0; i < n; i++) {
			arr[i] = nt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			arr[i] = nt();
		} {
			arr[i] = nt();
		} arr[i] = nt() arr[i] arr i nt() nt return arr; arr int n n String nt() {
		while (st == null || !st.hasMoreElements()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return st.nextToken();
	} nt {
		while (st == null || !st.hasMoreElements()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return st.nextToken();
	} while (st == null || !st.hasMoreElements()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (IOException e) {
				e.printStackTrace();
			}
		} st == null || !st.hasMoreElements() st == null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (IOException e) {
				e.printStackTrace();
			}
		} try {
				st = new StringTokenizer(br.readLine());
			} catch (IOException e) {
				e.printStackTrace();
			} catch (IOException e) {
				e.printStackTrace();
			} IOException e {
				e.printStackTrace();
			} e.printStackTrace() e.printStackTrace e {
				st = new StringTokenizer(br.readLine());
			} st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st int ni() {
		return Integer.parseInt(nt());
	} ni {
		return Integer.parseInt(nt());
	} return Integer.parseInt(nt()); Integer.parseInt(nt()) Integer.parseInt Integer nt() nt long nl() {
		return Long.parseLong(nt());
	} nl {
		return Long.parseLong(nt());
	} return Long.parseLong(nt()); Long.parseLong(nt()) Long.parseLong Long nt() nt double nd() {
		return Double.parseDouble(nt());
	} nd {
		return Double.parseDouble(nt());
	} return Double.parseDouble(nt()); Double.parseDouble(nt()) Double.parseDouble Double nt() nt public class Main {
	public static long MCD_Euclides(long long1, long ab){
	    while(ab != 0){
	         long t = ab;
	         ab = long1 % ab;
	         long1 = t;
	    }
	    return long1;
	}
	public static void main(String[] args) {
		FastScanner br = new FastScanner();
		ArrayList<Long> caca2 = new ArrayList<Long>();
		PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));
		int n1 = br.ni();
		int n2 = br.ni();
		for(int i=1;i<=n1;i++) {
			int cont = 0;
			int n = i;
			while(n<n2){
				cont++;
				n*=2;
			}
			caca2.add((long) (Math.pow(2, cont)*n1));
		}
		int arr = 1;
		long ab = caca2.get(0);
		for(int i=1;i<n1;i++) {
			if(caca2.get(i)==3)continue;
			if(ab>=caca2.get(i)) arr+=ab/caca2.get(i);
			else arr+=caca2.get(i)/ab;
		}
		System.out.println((double)arr/(double)ab);
		pw.close();
	}
} public class Main {
	public static long MCD_Euclides(long long1, long ab){
	    while(ab != 0){
	         long t = ab;
	         ab = long1 % ab;
	         long1 = t;
	    }
	    return long1;
	}
	public static void main(String[] args) {
		FastScanner br = new FastScanner();
		ArrayList<Long> caca2 = new ArrayList<Long>();
		PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));
		int n1 = br.ni();
		int n2 = br.ni();
		for(int i=1;i<=n1;i++) {
			int cont = 0;
			int n = i;
			while(n<n2){
				cont++;
				n*=2;
			}
			caca2.add((long) (Math.pow(2, cont)*n1));
		}
		int arr = 1;
		long ab = caca2.get(0);
		for(int i=1;i<n1;i++) {
			if(caca2.get(i)==3)continue;
			if(ab>=caca2.get(i)) arr+=ab/caca2.get(i);
			else arr+=caca2.get(i)/ab;
		}
		System.out.println((double)arr/(double)ab);
		pw.close();
	}
} Main
import java.util.*;
import java.io.*;

public class Main {
	public static long MCD_Euclides(long long1, long ab){
	    while(ab != 0){
	         long t = ab;
	         ab = long1 % ab;
	         long1 = t;
	    }
	    return long1;
	}
	public static void main(String[] args) {
		FastScanner br = new FastScanner();
		ArrayList<Long> caca2 = new ArrayList<Long>();
		PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));
		int n1 = br.ni();
		int n2 = br.ni();
		for(int i=1;i<=n1;i++) {
			int cont = 0;
			int n = i;
			while(n<n2){
				cont++;
				n*=2;
			}
			caca2.add((long) (Math.pow(2, cont)*n1));
		}
		int arr = 1;
		long ab = caca2.get(0);
		for(int i=1;i<n1;i++) {
			if(caca2.get(i)==3)continue;
			if(ab>=caca2.get(i)) arr+=ab/caca2.get(i);
			else arr+=caca2.get(i)/ab;
		}
		System.out.println((double)arr/(double)ab);
		pw.close();
	}
}

class FastScanner {
	BufferedReader br;
	StringTokenizer st;

	public FastScanner(String s) {
		try {
			br = new BufferedReader(new FileReader(s));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
	}

	public FastScanner() {
		br = new BufferedReader(new InputStreamReader(System.in));
	}

	ArrayList<Integer>[] ng(int n, int e) {
		ArrayList<Integer>[] adj = new ArrayList[n];
		for (int i = 0; i < n; i++) {
			adj[i] = new ArrayList<Integer>();
		}
		for (int i = 0; i < e; i++) {
			int a = ni() - 1;
			int b = ni() - 1;
			adj[a].add(b);
			adj[b].add(a);
		}
		return adj;
	}

	Integer[] nIa(int n) {
		Integer[] arr = new Integer[n];
		for (int i = 0; i < n; i++) {
			arr[i] = ni();
		}
		return arr;
	}

	int[] nia(int n) {
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = ni();
		}
		return arr;
	}

	Long[] nLa(int n) {
		Long[] arr = new Long[n];
		for (int i = 0; i < n; i++) {
			arr[i] = nl();
		}
		return arr;
	}

	long[] nla(int n) {
		long[] arr = new long[n];
		for (int i = 0; i < n; i++) {
			arr[i] = nl();
		}
		return arr;
	}

	String[] nsa(int n) {
		String[] arr = new String[n];
		for (int i = 0; i < n; i++) {
			arr[i] = nt();
		}
		return arr;
	}

	String nt() {
		while (st == null || !st.hasMoreElements()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return st.nextToken();
	}

	int ni() {
		return Integer.parseInt(nt());
	}

	long nl() {
		return Long.parseLong(nt());
	}

	double nd() {
		return Double.parseDouble(nt());
	}

}