import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        String[] line1 = line.split(" ");
        int a = Integer.parseInt(line1[0]);
        int b = Integer.parseInt(line1[1]);
        double sum = 0;
        int count = 0;
        for(int i = 1; i <= a; i++){
            int c = i;
            double sum1 = 0;
            double d = 1 / (double)a;
            double res = 1;
            for(int j = 0; c < b; j++){
                c = c * 2;
                count++;
                res = res * (1 / (double)2);
                //System.out.println(res);
                //System.out.println(c);
                //System.out.println(count);
            }
            //double res = Math.pow(1 / 2, count);
            sum1 = d * res;
            //System.out.println(sum1);
            sum = sum + sum1;
        }
        System.out.println(sum);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        String[] line1 = line.split(" ");
        int a = Integer.parseInt(line1[0]);
        int b = Integer.parseInt(line1[1]);
        double sum = 0;
        int count = 0;
        for(int i = 1; i <= a; i++){
            int c = i;
            double sum1 = 0;
            double d = 1 / (double)a;
            double res = 1;
            for(int j = 0; c < b; j++){
                c = c * 2;
                count++;
                res = res * (1 / (double)2);
                //System.out.println(res);
                //System.out.println(c);
                //System.out.println(count);
            }
            //double res = Math.pow(1 / 2, count);
            sum1 = d * res;
            //System.out.println(sum1);
            sum = sum + sum1;
        }
        System.out.println(sum);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        String[] line1 = line.split(" ");
        int a = Integer.parseInt(line1[0]);
        int b = Integer.parseInt(line1[1]);
        double sum = 0;
        int count = 0;
        for(int i = 1; i <= a; i++){
            int c = i;
            double sum1 = 0;
            double d = 1 / (double)a;
            double res = 1;
            for(int j = 0; c < b; j++){
                c = c * 2;
                count++;
                res = res * (1 / (double)2);
                //System.out.println(res);
                //System.out.println(c);
                //System.out.println(count);
            }
            //double res = Math.pow(1 / 2, count);
            sum1 = d * res;
            //System.out.println(sum1);
            sum = sum + sum1;
        }
        System.out.println(sum);
    } main {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        String[] line1 = line.split(" ");
        int a = Integer.parseInt(line1[0]);
        int b = Integer.parseInt(line1[1]);
        double sum = 0;
        int count = 0;
        for(int i = 1; i <= a; i++){
            int c = i;
            double sum1 = 0;
            double d = 1 / (double)a;
            double res = 1;
            for(int j = 0; c < b; j++){
                c = c * 2;
                count++;
                res = res * (1 / (double)2);
                //System.out.println(res);
                //System.out.println(c);
                //System.out.println(count);
            }
            //double res = Math.pow(1 / 2, count);
            sum1 = d * res;
            //System.out.println(sum1);
            sum = sum + sum1;
        }
        System.out.println(sum);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String[] line1 = line.split(" "); line1 line.split(" ") line.split line " " int a = Integer.parseInt(line1[0]); a Integer.parseInt(line1[0]) Integer.parseInt Integer line1[0] line1 0 int b = Integer.parseInt(line1[1]); b Integer.parseInt(line1[1]) Integer.parseInt Integer line1[1] line1 1 double sum = 0; sum 0 int count = 0; count 0 for(int i = 1; i <= a; i++){
            int c = i;
            double sum1 = 0;
            double d = 1 / (double)a;
            double res = 1;
            for(int j = 0; c < b; j++){
                c = c * 2;
                count++;
                res = res * (1 / (double)2);
                //System.out.println(res);
                //System.out.println(c);
                //System.out.println(count);
            }
            //double res = Math.pow(1 / 2, count);
            sum1 = d * res;
            //System.out.println(sum1);
            sum = sum + sum1;
        } int i = 1; int i = 1; i 1 i <= a i a i++ i++ i {
            int c = i;
            double sum1 = 0;
            double d = 1 / (double)a;
            double res = 1;
            for(int j = 0; c < b; j++){
                c = c * 2;
                count++;
                res = res * (1 / (double)2);
                //System.out.println(res);
                //System.out.println(c);
                //System.out.println(count);
            }
            //double res = Math.pow(1 / 2, count);
            sum1 = d * res;
            //System.out.println(sum1);
            sum = sum + sum1;
        } {
            int c = i;
            double sum1 = 0;
            double d = 1 / (double)a;
            double res = 1;
            for(int j = 0; c < b; j++){
                c = c * 2;
                count++;
                res = res * (1 / (double)2);
                //System.out.println(res);
                //System.out.println(c);
                //System.out.println(count);
            }
            //double res = Math.pow(1 / 2, count);
            sum1 = d * res;
            //System.out.println(sum1);
            sum = sum + sum1;
        } int c = i; c i double sum1 = 0; sum1 0 double d = 1 / (double)a; d 1 / (double)a 1 (double)a double res = 1; res 1 for(int j = 0; c < b; j++){
                c = c * 2;
                count++;
                res = res * (1 / (double)2);
                //System.out.println(res);
                //System.out.println(c);
                //System.out.println(count);
            } int j = 0; int j = 0; j 0 c < b c b j++ j++ j {
                c = c * 2;
                count++;
                res = res * (1 / (double)2);
                //System.out.println(res);
                //System.out.println(c);
                //System.out.println(count);
            } {
                c = c * 2;
                count++;
                res = res * (1 / (double)2);
                //System.out.println(res);
                //System.out.println(c);
                //System.out.println(count);
            } c = c * 2 c c * 2 c 2 count++ count res = res * (1 / (double)2) res res * (1 / (double)2) res (1 / (double)2) 1 (double)2 sum1 = d * res sum1 d * res d res sum = sum + sum1 sum sum + sum1 sum sum1 System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        String[] line1 = line.split(" ");
        int a = Integer.parseInt(line1[0]);
        int b = Integer.parseInt(line1[1]);
        double sum = 0;
        int count = 0;
        for(int i = 1; i <= a; i++){
            int c = i;
            double sum1 = 0;
            double d = 1 / (double)a;
            double res = 1;
            for(int j = 0; c < b; j++){
                c = c * 2;
                count++;
                res = res * (1 / (double)2);
                //System.out.println(res);
                //System.out.println(c);
                //System.out.println(count);
            }
            //double res = Math.pow(1 / 2, count);
            sum1 = d * res;
            //System.out.println(sum1);
            sum = sum + sum1;
        }
        System.out.println(sum);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        String[] line1 = line.split(" ");
        int a = Integer.parseInt(line1[0]);
        int b = Integer.parseInt(line1[1]);
        double sum = 0;
        int count = 0;
        for(int i = 1; i <= a; i++){
            int c = i;
            double sum1 = 0;
            double d = 1 / (double)a;
            double res = 1;
            for(int j = 0; c < b; j++){
                c = c * 2;
                count++;
                res = res * (1 / (double)2);
                //System.out.println(res);
                //System.out.println(c);
                //System.out.println(count);
            }
            //double res = Math.pow(1 / 2, count);
            sum1 = d * res;
            //System.out.println(sum1);
            sum = sum + sum1;
        }
        System.out.println(sum);
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        String[] line1 = line.split(" ");
        int a = Integer.parseInt(line1[0]);
        int b = Integer.parseInt(line1[1]);
        double sum = 0;
        int count = 0;
        for(int i = 1; i <= a; i++){
            int c = i;
            double sum1 = 0;
            double d = 1 / (double)a;
            double res = 1;
            for(int j = 0; c < b; j++){
                c = c * 2;
                count++;
                res = res * (1 / (double)2);
                //System.out.println(res);
                //System.out.println(c);
                //System.out.println(count);
            }
            //double res = Math.pow(1 / 2, count);
            sum1 = d * res;
            //System.out.println(sum1);
            sum = sum + sum1;
        }
        System.out.println(sum);
    }
}