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 sum = 0;
        int start = 1;
        while(start <= N){
            int n = start;
            double count = 0;
            while(n < K) {
                n *= 2;
                count++;
            }
            sum += 1 / Math.pow(2, count);
            start++;
        }

        System.out.println(sum/N);
    }
} 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 sum = 0;
        int start = 1;
        while(start <= N){
            int n = start;
            double count = 0;
            while(n < K) {
                n *= 2;
                count++;
            }
            sum += 1 / Math.pow(2, count);
            start++;
        }

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

        double sum = 0;
        int start = 1;
        while(start <= N){
            int n = start;
            double count = 0;
            while(n < K) {
                n *= 2;
                count++;
            }
            sum += 1 / Math.pow(2, count);
            start++;
        }

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

        double sum = 0;
        int start = 1;
        while(start <= N){
            int n = start;
            double count = 0;
            while(n < K) {
                n *= 2;
                count++;
            }
            sum += 1 / Math.pow(2, count);
            start++;
        }

        System.out.println(sum/N);
    } 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 sum = 0; sum 0 int start = 1; start 1 while(start <= N){
            int n = start;
            double count = 0;
            while(n < K) {
                n *= 2;
                count++;
            }
            sum += 1 / Math.pow(2, count);
            start++;
        } start <= N start N {
            int n = start;
            double count = 0;
            while(n < K) {
                n *= 2;
                count++;
            }
            sum += 1 / Math.pow(2, count);
            start++;
        } int n = start; n start double count = 0; count 0 while(n < K) {
                n *= 2;
                count++;
            } n < K n K {
                n *= 2;
                count++;
            } n *= 2 n 2 count++ count sum += 1 / Math.pow(2, count) sum 1 / Math.pow(2, count) 1 Math.pow(2, count) Math.pow Math 2 count start++ start System.out.println(sum/N) System.out.println System.out System System.out sum/N sum N 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 sum = 0;
        int start = 1;
        while(start <= N){
            int n = start;
            double count = 0;
            while(n < K) {
                n *= 2;
                count++;
            }
            sum += 1 / Math.pow(2, count);
            start++;
        }

        System.out.println(sum/N);
    }
} public class Main{

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

        double sum = 0;
        int start = 1;
        while(start <= N){
            int n = start;
            double count = 0;
            while(n < K) {
                n *= 2;
                count++;
            }
            sum += 1 / Math.pow(2, count);
            start++;
        }

        System.out.println(sum/N);
    }
} 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 sum = 0;
        int start = 1;
        while(start <= N){
            int n = start;
            double count = 0;
            while(n < K) {
                n *= 2;
                count++;
            }
            sum += 1 / Math.pow(2, count);
            start++;
        }

        System.out.println(sum/N);
    }
}