import java.util.*;

public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        Double sco = 0.0;
        for (int i = 1; i <= a; i++) {
            int co = 0;
            for (int j = i; j < b;j *= 2 ) {
                co += 1;

            }

            sco += (1.0 / a) * Math.pow(0.5, co);
        }
        System.out.println(sco);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        Double sco = 0.0;
        for (int i = 1; i <= a; i++) {
            int co = 0;
            for (int j = i; j < b;j *= 2 ) {
                co += 1;

            }

            sco += (1.0 / a) * Math.pow(0.5, co);
        }
        System.out.println(sco);
    }
} Main public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        Double sco = 0.0;
        for (int i = 1; i <= a; i++) {
            int co = 0;
            for (int j = i; j < b;j *= 2 ) {
                co += 1;

            }

            sco += (1.0 / a) * Math.pow(0.5, co);
        }
        System.out.println(sco);
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        Double sco = 0.0;
        for (int i = 1; i <= a; i++) {
            int co = 0;
            for (int j = i; j < b;j *= 2 ) {
                co += 1;

            }

            sco += (1.0 / a) * Math.pow(0.5, co);
        }
        System.out.println(sco);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc Double sco = 0.0; sco 0.0 for (int i = 1; i <= a; i++) {
            int co = 0;
            for (int j = i; j < b;j *= 2 ) {
                co += 1;

            }

            sco += (1.0 / a) * Math.pow(0.5, co);
        } int i = 1; int i = 1; i 1 i <= a i a i++ i++ i {
            int co = 0;
            for (int j = i; j < b;j *= 2 ) {
                co += 1;

            }

            sco += (1.0 / a) * Math.pow(0.5, co);
        } {
            int co = 0;
            for (int j = i; j < b;j *= 2 ) {
                co += 1;

            }

            sco += (1.0 / a) * Math.pow(0.5, co);
        } int co = 0; co 0 for (int j = i; j < b;j *= 2 ) {
                co += 1;

            } int j = i; int j = i; j i j < b j b j *= 2 j *= 2 j 2 {
                co += 1;

            } {
                co += 1;

            } co += 1 co 1 sco += (1.0 / a) * Math.pow(0.5, co) sco (1.0 / a) * Math.pow(0.5, co) (1.0 / a) 1.0 a Math.pow(0.5, co) Math.pow Math 0.5 co System.out.println(sco) System.out.println System.out System System.out sco String args[] args public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        Double sco = 0.0;
        for (int i = 1; i <= a; i++) {
            int co = 0;
            for (int j = i; j < b;j *= 2 ) {
                co += 1;

            }

            sco += (1.0 / a) * Math.pow(0.5, co);
        }
        System.out.println(sco);
    }
} public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        Double sco = 0.0;
        for (int i = 1; i <= a; i++) {
            int co = 0;
            for (int j = i; j < b;j *= 2 ) {
                co += 1;

            }

            sco += (1.0 / a) * Math.pow(0.5, co);
        }
        System.out.println(sco);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        Double sco = 0.0;
        for (int i = 1; i <= a; i++) {
            int co = 0;
            for (int j = i; j < b;j *= 2 ) {
                co += 1;

            }

            sco += (1.0 / a) * Math.pow(0.5, co);
        }
        System.out.println(sco);
    }
}
