import java.util.Scanner;

public class Main {
    public static void main (String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int n = sc.nextInt();
            int k = sc.nextInt();
            double ans = 0.0;
            
            for (int i = 1; i <= n; i++) {
                
                // Probability of occurence of the event
                double prob = 1.0/n;

                int now = i;
                
                // Keep multiplying by 2 till the now exceeds k. now is the exponent on 1/2
                while (now < k) {
                    now *= 2; 
                    prob /= 2;               
                }            
                ans += prob;
            }
           System.out.println(ans);
        }    
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main (String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int n = sc.nextInt();
            int k = sc.nextInt();
            double ans = 0.0;
            
            for (int i = 1; i <= n; i++) {
                
                // Probability of occurence of the event
                double prob = 1.0/n;

                int now = i;
                
                // Keep multiplying by 2 till the now exceeds k. now is the exponent on 1/2
                while (now < k) {
                    now *= 2; 
                    prob /= 2;               
                }            
                ans += prob;
            }
           System.out.println(ans);
        }    
    }
} Main public static void main (String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int n = sc.nextInt();
            int k = sc.nextInt();
            double ans = 0.0;
            
            for (int i = 1; i <= n; i++) {
                
                // Probability of occurence of the event
                double prob = 1.0/n;

                int now = i;
                
                // Keep multiplying by 2 till the now exceeds k. now is the exponent on 1/2
                while (now < k) {
                    now *= 2; 
                    prob /= 2;               
                }            
                ans += prob;
            }
           System.out.println(ans);
        }    
    } main {
        try (Scanner sc = new Scanner(System.in)) {
            int n = sc.nextInt();
            int k = sc.nextInt();
            double ans = 0.0;
            
            for (int i = 1; i <= n; i++) {
                
                // Probability of occurence of the event
                double prob = 1.0/n;

                int now = i;
                
                // Keep multiplying by 2 till the now exceeds k. now is the exponent on 1/2
                while (now < k) {
                    now *= 2; 
                    prob /= 2;               
                }            
                ans += prob;
            }
           System.out.println(ans);
        }    
    } try (Scanner sc = new Scanner(System.in)) {
            int n = sc.nextInt();
            int k = sc.nextInt();
            double ans = 0.0;
            
            for (int i = 1; i <= n; i++) {
                
                // Probability of occurence of the event
                double prob = 1.0/n;

                int now = i;
                
                // Keep multiplying by 2 till the now exceeds k. now is the exponent on 1/2
                while (now < k) {
                    now *= 2; 
                    prob /= 2;               
                }            
                ans += prob;
            }
           System.out.println(ans);
        } {
            int n = sc.nextInt();
            int k = sc.nextInt();
            double ans = 0.0;
            
            for (int i = 1; i <= n; i++) {
                
                // Probability of occurence of the event
                double prob = 1.0/n;

                int now = i;
                
                // Keep multiplying by 2 till the now exceeds k. now is the exponent on 1/2
                while (now < k) {
                    now *= 2; 
                    prob /= 2;               
                }            
                ans += prob;
            }
           System.out.println(ans);
        } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) 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 ans = 0.0; ans 0.0 for (int i = 1; i <= n; i++) {
                
                // Probability of occurence of the event
                double prob = 1.0/n;

                int now = i;
                
                // Keep multiplying by 2 till the now exceeds k. now is the exponent on 1/2
                while (now < k) {
                    now *= 2; 
                    prob /= 2;               
                }            
                ans += prob;
            } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
                
                // Probability of occurence of the event
                double prob = 1.0/n;

                int now = i;
                
                // Keep multiplying by 2 till the now exceeds k. now is the exponent on 1/2
                while (now < k) {
                    now *= 2; 
                    prob /= 2;               
                }            
                ans += prob;
            } {
                
                // Probability of occurence of the event
                double prob = 1.0/n;

                int now = i;
                
                // Keep multiplying by 2 till the now exceeds k. now is the exponent on 1/2
                while (now < k) {
                    now *= 2; 
                    prob /= 2;               
                }            
                ans += prob;
            } double prob = 1.0/n; prob 1.0/n 1.0 n int now = i; now i while (now < k) {
                    now *= 2; 
                    prob /= 2;               
                } now < k now k {
                    now *= 2; 
                    prob /= 2;               
                } now *= 2 now 2 prob /= 2 prob 2 ans += prob ans prob System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main (String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int n = sc.nextInt();
            int k = sc.nextInt();
            double ans = 0.0;
            
            for (int i = 1; i <= n; i++) {
                
                // Probability of occurence of the event
                double prob = 1.0/n;

                int now = i;
                
                // Keep multiplying by 2 till the now exceeds k. now is the exponent on 1/2
                while (now < k) {
                    now *= 2; 
                    prob /= 2;               
                }            
                ans += prob;
            }
           System.out.println(ans);
        }    
    }
} public class Main {
    public static void main (String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int n = sc.nextInt();
            int k = sc.nextInt();
            double ans = 0.0;
            
            for (int i = 1; i <= n; i++) {
                
                // Probability of occurence of the event
                double prob = 1.0/n;

                int now = i;
                
                // Keep multiplying by 2 till the now exceeds k. now is the exponent on 1/2
                while (now < k) {
                    now *= 2; 
                    prob /= 2;               
                }            
                ans += prob;
            }
           System.out.println(ans);
        }    
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main (String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int n = sc.nextInt();
            int k = sc.nextInt();
            double ans = 0.0;
            
            for (int i = 1; i <= n; i++) {
                
                // Probability of occurence of the event
                double prob = 1.0/n;

                int now = i;
                
                // Keep multiplying by 2 till the now exceeds k. now is the exponent on 1/2
                while (now < k) {
                    now *= 2; 
                    prob /= 2;               
                }            
                ans += prob;
            }
           System.out.println(ans);
        }    
    }
}