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 kaku = 0;
        for (int i=1; i<=N; i++) {
            int tokuten = i;
            double sunukeWin = (double)1/N;
            while (tokuten < K) {
                tokuten = tokuten * 2;
                sunukeWin = sunukeWin * 0.5;
            }
            kaku += sunukeWin;
        }

        System.out.println(kaku);
    }
} 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 kaku = 0;
        for (int i=1; i<=N; i++) {
            int tokuten = i;
            double sunukeWin = (double)1/N;
            while (tokuten < K) {
                tokuten = tokuten * 2;
                sunukeWin = sunukeWin * 0.5;
            }
            kaku += sunukeWin;
        }

        System.out.println(kaku);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();

        double kaku = 0;
        for (int i=1; i<=N; i++) {
            int tokuten = i;
            double sunukeWin = (double)1/N;
            while (tokuten < K) {
                tokuten = tokuten * 2;
                sunukeWin = sunukeWin * 0.5;
            }
            kaku += sunukeWin;
        }

        System.out.println(kaku);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();

        double kaku = 0;
        for (int i=1; i<=N; i++) {
            int tokuten = i;
            double sunukeWin = (double)1/N;
            while (tokuten < K) {
                tokuten = tokuten * 2;
                sunukeWin = sunukeWin * 0.5;
            }
            kaku += sunukeWin;
        }

        System.out.println(kaku);
    } 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 kaku = 0; kaku 0 for (int i=1; i<=N; i++) {
            int tokuten = i;
            double sunukeWin = (double)1/N;
            while (tokuten < K) {
                tokuten = tokuten * 2;
                sunukeWin = sunukeWin * 0.5;
            }
            kaku += sunukeWin;
        } int i=1; int i=1; i 1 i<=N i N i++ i++ i {
            int tokuten = i;
            double sunukeWin = (double)1/N;
            while (tokuten < K) {
                tokuten = tokuten * 2;
                sunukeWin = sunukeWin * 0.5;
            }
            kaku += sunukeWin;
        } {
            int tokuten = i;
            double sunukeWin = (double)1/N;
            while (tokuten < K) {
                tokuten = tokuten * 2;
                sunukeWin = sunukeWin * 0.5;
            }
            kaku += sunukeWin;
        } int tokuten = i; tokuten i double sunukeWin = (double)1/N; sunukeWin (double)1/N (double)1 N while (tokuten < K) {
                tokuten = tokuten * 2;
                sunukeWin = sunukeWin * 0.5;
            } tokuten < K tokuten K {
                tokuten = tokuten * 2;
                sunukeWin = sunukeWin * 0.5;
            } tokuten = tokuten * 2 tokuten tokuten * 2 tokuten 2 sunukeWin = sunukeWin * 0.5 sunukeWin sunukeWin * 0.5 sunukeWin 0.5 kaku += sunukeWin kaku sunukeWin System.out.println(kaku) System.out.println System.out System System.out kaku 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 kaku = 0;
        for (int i=1; i<=N; i++) {
            int tokuten = i;
            double sunukeWin = (double)1/N;
            while (tokuten < K) {
                tokuten = tokuten * 2;
                sunukeWin = sunukeWin * 0.5;
            }
            kaku += sunukeWin;
        }

        System.out.println(kaku);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();

        double kaku = 0;
        for (int i=1; i<=N; i++) {
            int tokuten = i;
            double sunukeWin = (double)1/N;
            while (tokuten < K) {
                tokuten = tokuten * 2;
                sunukeWin = sunukeWin * 0.5;
            }
            kaku += sunukeWin;
        }

        System.out.println(kaku);
    }
} 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 kaku = 0;
        for (int i=1; i<=N; i++) {
            int tokuten = i;
            double sunukeWin = (double)1/N;
            while (tokuten < K) {
                tokuten = tokuten * 2;
                sunukeWin = sunukeWin * 0.5;
            }
            kaku += sunukeWin;
        }

        System.out.println(kaku);
    }
}