import java.util.*;

public class Main {
    public static void main(String[] args) {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        double n = sc.nextInt();
        int k = sc.nextInt();
        double ans = 0;
        double d = 0.5;
        for(int i = 1; i <= n; i++){
            double j = i;
            int l = 1;
            while(k>j){
                double num1 = Math.pow(2,l);
                j = i * num1;
                l = l + 1;
            }
            l = l -1;
            double num = Math.pow(d,l);
            double num2 = (double)1 / n;
            ans = ans + num2 * num;
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        double n = sc.nextInt();
        int k = sc.nextInt();
        double ans = 0;
        double d = 0.5;
        for(int i = 1; i <= n; i++){
            double j = i;
            int l = 1;
            while(k>j){
                double num1 = Math.pow(2,l);
                j = i * num1;
                l = l + 1;
            }
            l = l -1;
            double num = Math.pow(d,l);
            double num2 = (double)1 / n;
            ans = ans + num2 * num;
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        double n = sc.nextInt();
        int k = sc.nextInt();
        double ans = 0;
        double d = 0.5;
        for(int i = 1; i <= n; i++){
            double j = i;
            int l = 1;
            while(k>j){
                double num1 = Math.pow(2,l);
                j = i * num1;
                l = l + 1;
            }
            l = l -1;
            double num = Math.pow(d,l);
            double num2 = (double)1 / n;
            ans = ans + num2 * num;
        }
        System.out.println(ans);
    } main {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        double n = sc.nextInt();
        int k = sc.nextInt();
        double ans = 0;
        double d = 0.5;
        for(int i = 1; i <= n; i++){
            double j = i;
            int l = 1;
            while(k>j){
                double num1 = Math.pow(2,l);
                j = i * num1;
                l = l + 1;
            }
            l = l -1;
            double num = Math.pow(d,l);
            double num2 = (double)1 / n;
            ans = ans + num2 * num;
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) double n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int k = sc.nextInt(); k sc.nextInt() sc.nextInt sc double ans = 0; ans 0 double d = 0.5; d 0.5 for(int i = 1; i <= n; i++){
            double j = i;
            int l = 1;
            while(k>j){
                double num1 = Math.pow(2,l);
                j = i * num1;
                l = l + 1;
            }
            l = l -1;
            double num = Math.pow(d,l);
            double num2 = (double)1 / n;
            ans = ans + num2 * num;
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            double j = i;
            int l = 1;
            while(k>j){
                double num1 = Math.pow(2,l);
                j = i * num1;
                l = l + 1;
            }
            l = l -1;
            double num = Math.pow(d,l);
            double num2 = (double)1 / n;
            ans = ans + num2 * num;
        } {
            double j = i;
            int l = 1;
            while(k>j){
                double num1 = Math.pow(2,l);
                j = i * num1;
                l = l + 1;
            }
            l = l -1;
            double num = Math.pow(d,l);
            double num2 = (double)1 / n;
            ans = ans + num2 * num;
        } double j = i; j i int l = 1; l 1 while(k>j){
                double num1 = Math.pow(2,l);
                j = i * num1;
                l = l + 1;
            } k>j k j {
                double num1 = Math.pow(2,l);
                j = i * num1;
                l = l + 1;
            } double num1 = Math.pow(2,l); num1 Math.pow(2,l) Math.pow Math 2 l j = i * num1 j i * num1 i num1 l = l + 1 l l + 1 l 1 l = l -1 l l -1 l 1 double num = Math.pow(d,l); num Math.pow(d,l) Math.pow Math d l double num2 = (double)1 / n; num2 (double)1 / n (double)1 n ans = ans + num2 * num ans ans + num2 * num ans num2 * num num2 num 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) {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        double n = sc.nextInt();
        int k = sc.nextInt();
        double ans = 0;
        double d = 0.5;
        for(int i = 1; i <= n; i++){
            double j = i;
            int l = 1;
            while(k>j){
                double num1 = Math.pow(2,l);
                j = i * num1;
                l = l + 1;
            }
            l = l -1;
            double num = Math.pow(d,l);
            double num2 = (double)1 / n;
            ans = ans + num2 * num;
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        double n = sc.nextInt();
        int k = sc.nextInt();
        double ans = 0;
        double d = 0.5;
        for(int i = 1; i <= n; i++){
            double j = i;
            int l = 1;
            while(k>j){
                double num1 = Math.pow(2,l);
                j = i * num1;
                l = l + 1;
            }
            l = l -1;
            double num = Math.pow(d,l);
            double num2 = (double)1 / n;
            ans = ans + num2 * num;
        }
        System.out.println(ans);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        double n = sc.nextInt();
        int k = sc.nextInt();
        double ans = 0;
        double d = 0.5;
        for(int i = 1; i <= n; i++){
            double j = i;
            int l = 1;
            while(k>j){
                double num1 = Math.pow(2,l);
                j = i * num1;
                l = l + 1;
            }
            l = l -1;
            double num = Math.pow(d,l);
            double num2 = (double)1 / n;
            ans = ans + num2 * num;
        }
        System.out.println(ans);
    }
}