import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		double total = 0;
		for (int i = 1; i <= n; i++) {
		    double base = 1 / (double)n;
		    int start = i;
		    while (start < k) {
		        base /= 2;
		        start *= 2;
		    }
		    total += base;
		}
		System.out.println(java.math.BigDecimal.valueOf(total).toPlainString());
	}
} import java.util.*; util.* java public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		double total = 0;
		for (int i = 1; i <= n; i++) {
		    double base = 1 / (double)n;
		    int start = i;
		    while (start < k) {
		        base /= 2;
		        start *= 2;
		    }
		    total += base;
		}
		System.out.println(java.math.BigDecimal.valueOf(total).toPlainString());
	}
} Main public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		double total = 0;
		for (int i = 1; i <= n; i++) {
		    double base = 1 / (double)n;
		    int start = i;
		    while (start < k) {
		        base /= 2;
		        start *= 2;
		    }
		    total += base;
		}
		System.out.println(java.math.BigDecimal.valueOf(total).toPlainString());
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		double total = 0;
		for (int i = 1; i <= n; i++) {
		    double base = 1 / (double)n;
		    int start = i;
		    while (start < k) {
		        base /= 2;
		        start *= 2;
		    }
		    total += base;
		}
		System.out.println(java.math.BigDecimal.valueOf(total).toPlainString());
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int k = sc.nextInt(); k sc.nextInt() sc.nextInt sc double total = 0; total 0 for (int i = 1; i <= n; i++) {
		    double base = 1 / (double)n;
		    int start = i;
		    while (start < k) {
		        base /= 2;
		        start *= 2;
		    }
		    total += base;
		} int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
		    double base = 1 / (double)n;
		    int start = i;
		    while (start < k) {
		        base /= 2;
		        start *= 2;
		    }
		    total += base;
		} {
		    double base = 1 / (double)n;
		    int start = i;
		    while (start < k) {
		        base /= 2;
		        start *= 2;
		    }
		    total += base;
		} double base = 1 / (double)n; base 1 / (double)n 1 (double)n int start = i; start i while (start < k) {
		        base /= 2;
		        start *= 2;
		    } start < k start k {
		        base /= 2;
		        start *= 2;
		    } base /= 2 base 2 start *= 2 start 2 total += base total base System.out.println(java.math.BigDecimal.valueOf(total).toPlainString()) System.out.println System.out System System.out java.math.BigDecimal.valueOf(total).toPlainString() java.math.BigDecimal.valueOf(total).toPlainString java.math.BigDecimal.valueOf(total) java.math.BigDecimal.valueOf java.math.BigDecimal java.math java java.math java.math.BigDecimal total String[] args args public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		double total = 0;
		for (int i = 1; i <= n; i++) {
		    double base = 1 / (double)n;
		    int start = i;
		    while (start < k) {
		        base /= 2;
		        start *= 2;
		    }
		    total += base;
		}
		System.out.println(java.math.BigDecimal.valueOf(total).toPlainString());
	}
} public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		double total = 0;
		for (int i = 1; i <= n; i++) {
		    double base = 1 / (double)n;
		    int start = i;
		    while (start < k) {
		        base /= 2;
		        start *= 2;
		    }
		    total += base;
		}
		System.out.println(java.math.BigDecimal.valueOf(total).toPlainString());
	}
} Main
import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		double total = 0;
		for (int i = 1; i <= n; i++) {
		    double base = 1 / (double)n;
		    int start = i;
		    while (start < k) {
		        base /= 2;
		        start *= 2;
		    }
		    total += base;
		}
		System.out.println(java.math.BigDecimal.valueOf(total).toPlainString());
	}
}
