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_rate = 0;

        for (int p = 1; p <= n; p++){
            double rate = 1.0/n;
            int now = p;
            while(now <= k-1){
                now = now * 2;
                rate = rate/2;
            }
            total_rate += rate;
        }

        System.out.print(total_rate);

    }
}

 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_rate = 0;

        for (int p = 1; p <= n; p++){
            double rate = 1.0/n;
            int now = p;
            while(now <= k-1){
                now = now * 2;
                rate = rate/2;
            }
            total_rate += rate;
        }

        System.out.print(total_rate);

    }
} Main public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int k = sc.nextInt();

        double total_rate = 0;

        for (int p = 1; p <= n; p++){
            double rate = 1.0/n;
            int now = p;
            while(now <= k-1){
                now = now * 2;
                rate = rate/2;
            }
            total_rate += rate;
        }

        System.out.print(total_rate);

    } main {

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int k = sc.nextInt();

        double total_rate = 0;

        for (int p = 1; p <= n; p++){
            double rate = 1.0/n;
            int now = p;
            while(now <= k-1){
                now = now * 2;
                rate = rate/2;
            }
            total_rate += rate;
        }

        System.out.print(total_rate);

    } 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_rate = 0; total_rate 0 for (int p = 1; p <= n; p++){
            double rate = 1.0/n;
            int now = p;
            while(now <= k-1){
                now = now * 2;
                rate = rate/2;
            }
            total_rate += rate;
        } int p = 1; int p = 1; p 1 p <= n p n p++ p++ p {
            double rate = 1.0/n;
            int now = p;
            while(now <= k-1){
                now = now * 2;
                rate = rate/2;
            }
            total_rate += rate;
        } {
            double rate = 1.0/n;
            int now = p;
            while(now <= k-1){
                now = now * 2;
                rate = rate/2;
            }
            total_rate += rate;
        } double rate = 1.0/n; rate 1.0/n 1.0 n int now = p; now p while(now <= k-1){
                now = now * 2;
                rate = rate/2;
            } now <= k-1 now k-1 k 1 {
                now = now * 2;
                rate = rate/2;
            } now = now * 2 now now * 2 now 2 rate = rate/2 rate rate/2 rate 2 total_rate += rate total_rate rate System.out.print(total_rate) System.out.print System.out System System.out total_rate 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_rate = 0;

        for (int p = 1; p <= n; p++){
            double rate = 1.0/n;
            int now = p;
            while(now <= k-1){
                now = now * 2;
                rate = rate/2;
            }
            total_rate += rate;
        }

        System.out.print(total_rate);

    }
} 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_rate = 0;

        for (int p = 1; p <= n; p++){
            double rate = 1.0/n;
            int now = p;
            while(now <= k-1){
                now = now * 2;
                rate = rate/2;
            }
            total_rate += rate;
        }

        System.out.print(total_rate);

    }
} 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_rate = 0;

        for (int p = 1; p <= n; p++){
            double rate = 1.0/n;
            int now = p;
            while(now <= k-1){
                now = now * 2;
                rate = rate/2;
            }
            total_rate += rate;
        }

        System.out.print(total_rate);

    }
}


