import java.math.BigDecimal;
import java.util.*;
public class Main {
    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int k = sc.nextInt();
        Double d = 0.0;
        for (int i = 1; i <= n; i++) {
            double temp = (1.0d / n);
            int t = i;
            while (t < k) {
                t *= 2;
                temp /= 2;
            }
            d += temp;
        }
        System.out.print(BigDecimal.valueOf(d).toPlainString());
    }
} import java.math.BigDecimal; BigDecimal java.math import java.util.*; util.* java public class Main {
    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int k = sc.nextInt();
        Double d = 0.0;
        for (int i = 1; i <= n; i++) {
            double temp = (1.0d / n);
            int t = i;
            while (t < k) {
                t *= 2;
                temp /= 2;
            }
            d += temp;
        }
        System.out.print(BigDecimal.valueOf(d).toPlainString());
    }
} Main public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int k = sc.nextInt();
        Double d = 0.0;
        for (int i = 1; i <= n; i++) {
            double temp = (1.0d / n);
            int t = i;
            while (t < k) {
                t *= 2;
                temp /= 2;
            }
            d += temp;
        }
        System.out.print(BigDecimal.valueOf(d).toPlainString());
    } main {
        final Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int k = sc.nextInt();
        Double d = 0.0;
        for (int i = 1; i <= n; i++) {
            double temp = (1.0d / n);
            int t = i;
            while (t < k) {
                t *= 2;
                temp /= 2;
            }
            d += temp;
        }
        System.out.print(BigDecimal.valueOf(d).toPlainString());
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc final int k = sc.nextInt(); k sc.nextInt() sc.nextInt sc Double d = 0.0; d 0.0 for (int i = 1; i <= n; i++) {
            double temp = (1.0d / n);
            int t = i;
            while (t < k) {
                t *= 2;
                temp /= 2;
            }
            d += temp;
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            double temp = (1.0d / n);
            int t = i;
            while (t < k) {
                t *= 2;
                temp /= 2;
            }
            d += temp;
        } {
            double temp = (1.0d / n);
            int t = i;
            while (t < k) {
                t *= 2;
                temp /= 2;
            }
            d += temp;
        } double temp = (1.0d / n); temp (1.0d / n) 1.0d n int t = i; t i while (t < k) {
                t *= 2;
                temp /= 2;
            } t < k t k {
                t *= 2;
                temp /= 2;
            } t *= 2 t 2 temp /= 2 temp 2 d += temp d temp System.out.print(BigDecimal.valueOf(d).toPlainString()) System.out.print System.out System System.out BigDecimal.valueOf(d).toPlainString() BigDecimal.valueOf(d).toPlainString BigDecimal.valueOf(d) BigDecimal.valueOf BigDecimal d final String[] args args public class Main {
    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int k = sc.nextInt();
        Double d = 0.0;
        for (int i = 1; i <= n; i++) {
            double temp = (1.0d / n);
            int t = i;
            while (t < k) {
                t *= 2;
                temp /= 2;
            }
            d += temp;
        }
        System.out.print(BigDecimal.valueOf(d).toPlainString());
    }
} public class Main {
    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int k = sc.nextInt();
        Double d = 0.0;
        for (int i = 1; i <= n; i++) {
            double temp = (1.0d / n);
            int t = i;
            while (t < k) {
                t *= 2;
                temp /= 2;
            }
            d += temp;
        }
        System.out.print(BigDecimal.valueOf(d).toPlainString());
    }
} Main
import java.math.BigDecimal;
import java.util.*;
public class Main {
    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int k = sc.nextInt();
        Double d = 0.0;
        for (int i = 1; i <= n; i++) {
            double temp = (1.0d / n);
            int t = i;
            while (t < k) {
                t *= 2;
                temp /= 2;
            }
            d += temp;
        }
        System.out.print(BigDecimal.valueOf(d).toPlainString());
    }
}