import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        int tmp;
        double sum = 0,p;
        for(int i=0;i<n;i++){
            tmp = i+1;
            p = 1.0/n;
            while(tmp<=k-1){
                tmp*=2;
                p/=2.0;
            }
            sum+=p;
        }
        System.out.println(sum);
        System.out.flush();
        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        int tmp;
        double sum = 0,p;
        for(int i=0;i<n;i++){
            tmp = i+1;
            p = 1.0/n;
            while(tmp<=k-1){
                tmp*=2;
                p/=2.0;
            }
            sum+=p;
        }
        System.out.println(sum);
        System.out.flush();
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        int tmp;
        double sum = 0,p;
        for(int i=0;i<n;i++){
            tmp = i+1;
            p = 1.0/n;
            while(tmp<=k-1){
                tmp*=2;
                p/=2.0;
            }
            sum+=p;
        }
        System.out.println(sum);
        System.out.flush();
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        int tmp;
        double sum = 0,p;
        for(int i=0;i<n;i++){
            tmp = i+1;
            p = 1.0/n;
            while(tmp<=k-1){
                tmp*=2;
                p/=2.0;
            }
            sum+=p;
        }
        System.out.println(sum);
        System.out.flush();
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int k = Integer.parseInt(sc.next()); k Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int tmp; tmp double sum = 0 sum 0 p; p for(int i=0;i<n;i++){
            tmp = i+1;
            p = 1.0/n;
            while(tmp<=k-1){
                tmp*=2;
                p/=2.0;
            }
            sum+=p;
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            tmp = i+1;
            p = 1.0/n;
            while(tmp<=k-1){
                tmp*=2;
                p/=2.0;
            }
            sum+=p;
        } {
            tmp = i+1;
            p = 1.0/n;
            while(tmp<=k-1){
                tmp*=2;
                p/=2.0;
            }
            sum+=p;
        } tmp = i+1 tmp i+1 i 1 p = 1.0/n p 1.0/n 1.0 n while(tmp<=k-1){
                tmp*=2;
                p/=2.0;
            } tmp<=k-1 tmp k-1 k 1 {
                tmp*=2;
                p/=2.0;
            } tmp*=2 tmp 2 p/=2.0 p 2.0 sum+=p sum p System.out.println(sum) System.out.println System.out System System.out sum System.out.flush() System.out.flush System.out System System.out sc.close() sc.close sc String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        int tmp;
        double sum = 0,p;
        for(int i=0;i<n;i++){
            tmp = i+1;
            p = 1.0/n;
            while(tmp<=k-1){
                tmp*=2;
                p/=2.0;
            }
            sum+=p;
        }
        System.out.println(sum);
        System.out.flush();
        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        int tmp;
        double sum = 0,p;
        for(int i=0;i<n;i++){
            tmp = i+1;
            p = 1.0/n;
            while(tmp<=k-1){
                tmp*=2;
                p/=2.0;
            }
            sum+=p;
        }
        System.out.println(sum);
        System.out.flush();
        sc.close();
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        int tmp;
        double sum = 0,p;
        for(int i=0;i<n;i++){
            tmp = i+1;
            p = 1.0/n;
            while(tmp<=k-1){
                tmp*=2;
                p/=2.0;
            }
            sum+=p;
        }
        System.out.println(sum);
        System.out.flush();
        sc.close();
    }
}