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

final class Solver {
	static final Solver INSTANCE = new Solver();

	void solve(Supplier<String> sc) {
		int N = Integer.parseInt(sc.get());
		int K = Integer.parseInt(sc.get());
		double result = 0;
		for (int i = 1; i <= N; i++) {
			int j = 1;
			while (i * j < K) j *= 2;
			result += 1. / j;
		}
		System.out.println(result / N);
	}
}

class Main {
	public static void main(String... args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		Solver.INSTANCE.solve(new Supplier<String>() {
			StringTokenizer line;

			public String get() {
				try {
					return (line = line != null && line.hasMoreTokens() ? line : new StringTokenizer(reader.readLine())).nextToken();
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			}
		});
	}
} Supplier<String>() {
			StringTokenizer line;

			public String get() {
				try {
					return (line = line != null && line.hasMoreTokens() ? line : new StringTokenizer(reader.readLine())).nextToken();
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			}
		} StringTokenizer line; line public String get() {
				try {
					return (line = line != null && line.hasMoreTokens() ? line : new StringTokenizer(reader.readLine())).nextToken();
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			} get {
				try {
					return (line = line != null && line.hasMoreTokens() ? line : new StringTokenizer(reader.readLine())).nextToken();
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			} try {
					return (line = line != null && line.hasMoreTokens() ? line : new StringTokenizer(reader.readLine())).nextToken();
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				} IOException e {
					throw new UncheckedIOException(e);
				} throw new UncheckedIOException(e); new UncheckedIOException(e) {
					return (line = line != null && line.hasMoreTokens() ? line : new StringTokenizer(reader.readLine())).nextToken();
				} return (line = line != null && line.hasMoreTokens() ? line : new StringTokenizer(reader.readLine())).nextToken(); (line = line != null && line.hasMoreTokens() ? line : new StringTokenizer(reader.readLine())).nextToken() (line = line != null && line.hasMoreTokens() ? line : new StringTokenizer(reader.readLine())).nextToken (line = line != null && line.hasMoreTokens() ? line : new StringTokenizer(reader.readLine())) line line != null && line.hasMoreTokens() ? line : new StringTokenizer(reader.readLine()) line != null && line.hasMoreTokens() line != null line null line.hasMoreTokens() line.hasMoreTokens line line new StringTokenizer(reader.readLine()) import java.io.*; io.* java import java.util.*; util.* java import java.util.function.*; function.* java.util final class Solver {
	static final Solver INSTANCE = new Solver();

	void solve(Supplier<String> sc) {
		int N = Integer.parseInt(sc.get());
		int K = Integer.parseInt(sc.get());
		double result = 0;
		for (int i = 1; i <= N; i++) {
			int j = 1;
			while (i * j < K) j *= 2;
			result += 1. / j;
		}
		System.out.println(result / N);
	}
} Solver static final Solver INSTANCE = new Solver(); INSTANCE new Solver() void solve(Supplier<String> sc) {
		int N = Integer.parseInt(sc.get());
		int K = Integer.parseInt(sc.get());
		double result = 0;
		for (int i = 1; i <= N; i++) {
			int j = 1;
			while (i * j < K) j *= 2;
			result += 1. / j;
		}
		System.out.println(result / N);
	} solve {
		int N = Integer.parseInt(sc.get());
		int K = Integer.parseInt(sc.get());
		double result = 0;
		for (int i = 1; i <= N; i++) {
			int j = 1;
			while (i * j < K) j *= 2;
			result += 1. / j;
		}
		System.out.println(result / N);
	} int N = Integer.parseInt(sc.get()); N Integer.parseInt(sc.get()) Integer.parseInt Integer sc.get() sc.get sc int K = Integer.parseInt(sc.get()); K Integer.parseInt(sc.get()) Integer.parseInt Integer sc.get() sc.get sc double result = 0; result 0 for (int i = 1; i <= N; i++) {
			int j = 1;
			while (i * j < K) j *= 2;
			result += 1. / j;
		} int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
			int j = 1;
			while (i * j < K) j *= 2;
			result += 1. / j;
		} {
			int j = 1;
			while (i * j < K) j *= 2;
			result += 1. / j;
		} int j = 1; j 1 while (i * j < K) j *= 2; i * j < K i * j i j K j *= 2 j 2 result += 1. / j result 1. / j 1. j System.out.println(result / N) System.out.println System.out System System.out result / N result N Supplier<String> sc sc class Main {
	public static void main(String... args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		Solver.INSTANCE.solve(new Supplier<String>() {
			StringTokenizer line;

			public String get() {
				try {
					return (line = line != null && line.hasMoreTokens() ? line : new StringTokenizer(reader.readLine())).nextToken();
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			}
		});
	}
} Main public static void main(String... args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		Solver.INSTANCE.solve(new Supplier<String>() {
			StringTokenizer line;

			public String get() {
				try {
					return (line = line != null && line.hasMoreTokens() ? line : new StringTokenizer(reader.readLine())).nextToken();
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			}
		});
	} main {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		Solver.INSTANCE.solve(new Supplier<String>() {
			StringTokenizer line;

			public String get() {
				try {
					return (line = line != null && line.hasMoreTokens() ? line : new StringTokenizer(reader.readLine())).nextToken();
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			}
		});
	} BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) Solver.INSTANCE.solve(new Supplier<String>() {
			StringTokenizer line;

			public String get() {
				try {
					return (line = line != null && line.hasMoreTokens() ? line : new StringTokenizer(reader.readLine())).nextToken();
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			}
		}) Solver.INSTANCE.solve Solver.INSTANCE Solver Solver.INSTANCE new Supplier<String>() {
			StringTokenizer line;

			public String get() {
				try {
					return (line = line != null && line.hasMoreTokens() ? line : new StringTokenizer(reader.readLine())).nextToken();
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			}
		} String... args args
import java.io.*;
import java.util.*;
import java.util.function.*;

final class Solver {
	static final Solver INSTANCE = new Solver();

	void solve(Supplier<String> sc) {
		int N = Integer.parseInt(sc.get());
		int K = Integer.parseInt(sc.get());
		double result = 0;
		for (int i = 1; i <= N; i++) {
			int j = 1;
			while (i * j < K) j *= 2;
			result += 1. / j;
		}
		System.out.println(result / N);
	}
}

class Main {
	public static void main(String... args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		Solver.INSTANCE.solve(new Supplier<String>() {
			StringTokenizer line;

			public String get() {
				try {
					return (line = line != null && line.hasMoreTokens() ? line : new StringTokenizer(reader.readLine())).nextToken();
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			}
		});
	}
}