import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String num = sc.nextLine();
		String[] numSpl = num.split(" ");
		int n = Integer.parseInt(numSpl[0]);
		int k = Integer.parseInt(numSpl[1]);
		int point = 0;
		int count = 0;
		double p = 0;
		double out = 0;
		
		for(int i = 1; i <= n;i++){
			point = i;
			while(point < k){
				point = point *2;
				count++;
			}
			p = (1/(double)n) * Math.pow(0.5, count);
			out = out + p;
			count = 0;
		}
		System.out.println(out);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String num = sc.nextLine();
		String[] numSpl = num.split(" ");
		int n = Integer.parseInt(numSpl[0]);
		int k = Integer.parseInt(numSpl[1]);
		int point = 0;
		int count = 0;
		double p = 0;
		double out = 0;
		
		for(int i = 1; i <= n;i++){
			point = i;
			while(point < k){
				point = point *2;
				count++;
			}
			p = (1/(double)n) * Math.pow(0.5, count);
			out = out + p;
			count = 0;
		}
		System.out.println(out);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String num = sc.nextLine();
		String[] numSpl = num.split(" ");
		int n = Integer.parseInt(numSpl[0]);
		int k = Integer.parseInt(numSpl[1]);
		int point = 0;
		int count = 0;
		double p = 0;
		double out = 0;
		
		for(int i = 1; i <= n;i++){
			point = i;
			while(point < k){
				point = point *2;
				count++;
			}
			p = (1/(double)n) * Math.pow(0.5, count);
			out = out + p;
			count = 0;
		}
		System.out.println(out);
	} main {
		Scanner sc = new Scanner(System.in);
		String num = sc.nextLine();
		String[] numSpl = num.split(" ");
		int n = Integer.parseInt(numSpl[0]);
		int k = Integer.parseInt(numSpl[1]);
		int point = 0;
		int count = 0;
		double p = 0;
		double out = 0;
		
		for(int i = 1; i <= n;i++){
			point = i;
			while(point < k){
				point = point *2;
				count++;
			}
			p = (1/(double)n) * Math.pow(0.5, count);
			out = out + p;
			count = 0;
		}
		System.out.println(out);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String num = sc.nextLine(); num sc.nextLine() sc.nextLine sc String[] numSpl = num.split(" "); numSpl num.split(" ") num.split num " " int n = Integer.parseInt(numSpl[0]); n Integer.parseInt(numSpl[0]) Integer.parseInt Integer numSpl[0] numSpl 0 int k = Integer.parseInt(numSpl[1]); k Integer.parseInt(numSpl[1]) Integer.parseInt Integer numSpl[1] numSpl 1 int point = 0; point 0 int count = 0; count 0 double p = 0; p 0 double out = 0; out 0 for(int i = 1; i <= n;i++){
			point = i;
			while(point < k){
				point = point *2;
				count++;
			}
			p = (1/(double)n) * Math.pow(0.5, count);
			out = out + p;
			count = 0;
		} int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
			point = i;
			while(point < k){
				point = point *2;
				count++;
			}
			p = (1/(double)n) * Math.pow(0.5, count);
			out = out + p;
			count = 0;
		} {
			point = i;
			while(point < k){
				point = point *2;
				count++;
			}
			p = (1/(double)n) * Math.pow(0.5, count);
			out = out + p;
			count = 0;
		} point = i point i while(point < k){
				point = point *2;
				count++;
			} point < k point k {
				point = point *2;
				count++;
			} point = point *2 point point *2 point 2 count++ count p = (1/(double)n) * Math.pow(0.5, count) p (1/(double)n) * Math.pow(0.5, count) (1/(double)n) 1 (double)n Math.pow(0.5, count) Math.pow Math 0.5 count out = out + p out out + p out p count = 0 count 0 System.out.println(out) System.out.println System.out System System.out out String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String num = sc.nextLine();
		String[] numSpl = num.split(" ");
		int n = Integer.parseInt(numSpl[0]);
		int k = Integer.parseInt(numSpl[1]);
		int point = 0;
		int count = 0;
		double p = 0;
		double out = 0;
		
		for(int i = 1; i <= n;i++){
			point = i;
			while(point < k){
				point = point *2;
				count++;
			}
			p = (1/(double)n) * Math.pow(0.5, count);
			out = out + p;
			count = 0;
		}
		System.out.println(out);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String num = sc.nextLine();
		String[] numSpl = num.split(" ");
		int n = Integer.parseInt(numSpl[0]);
		int k = Integer.parseInt(numSpl[1]);
		int point = 0;
		int count = 0;
		double p = 0;
		double out = 0;
		
		for(int i = 1; i <= n;i++){
			point = i;
			while(point < k){
				point = point *2;
				count++;
			}
			p = (1/(double)n) * Math.pow(0.5, count);
			out = out + p;
			count = 0;
		}
		System.out.println(out);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String num = sc.nextLine();
		String[] numSpl = num.split(" ");
		int n = Integer.parseInt(numSpl[0]);
		int k = Integer.parseInt(numSpl[1]);
		int point = 0;
		int count = 0;
		double p = 0;
		double out = 0;
		
		for(int i = 1; i <= n;i++){
			point = i;
			while(point < k){
				point = point *2;
				count++;
			}
			p = (1/(double)n) * Math.pow(0.5, count);
			out = out + p;
			count = 0;
		}
		System.out.println(out);
	}
}