import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();

        String[] input = line.split(" ", 0);

        int N = Integer.valueOf(input[0]).intValue();
        int K = Integer.valueOf(input[1]).intValue();
        int[] bunbo = new int[N];
        double result = 0.0;

        for(int i = 1; i < N+1; i++){
            int j = i;
            bunbo[i-1] = N;
            while(K > j) {
                j *= 2;
                bunbo[i-1] *= 2;
            }
            result += 1.0/bunbo[i-1];
        }

        System.out.println(result);

    }
} 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[] input = line.split(" ", 0);

        int N = Integer.valueOf(input[0]).intValue();
        int K = Integer.valueOf(input[1]).intValue();
        int[] bunbo = new int[N];
        double result = 0.0;

        for(int i = 1; i < N+1; i++){
            int j = i;
            bunbo[i-1] = N;
            while(K > j) {
                j *= 2;
                bunbo[i-1] *= 2;
            }
            result += 1.0/bunbo[i-1];
        }

        System.out.println(result);

    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();

        String[] input = line.split(" ", 0);

        int N = Integer.valueOf(input[0]).intValue();
        int K = Integer.valueOf(input[1]).intValue();
        int[] bunbo = new int[N];
        double result = 0.0;

        for(int i = 1; i < N+1; i++){
            int j = i;
            bunbo[i-1] = N;
            while(K > j) {
                j *= 2;
                bunbo[i-1] *= 2;
            }
            result += 1.0/bunbo[i-1];
        }

        System.out.println(result);

    } main {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();

        String[] input = line.split(" ", 0);

        int N = Integer.valueOf(input[0]).intValue();
        int K = Integer.valueOf(input[1]).intValue();
        int[] bunbo = new int[N];
        double result = 0.0;

        for(int i = 1; i < N+1; i++){
            int j = i;
            bunbo[i-1] = N;
            while(K > j) {
                j *= 2;
                bunbo[i-1] *= 2;
            }
            result += 1.0/bunbo[i-1];
        }

        System.out.println(result);

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String[] input = line.split(" ", 0); input line.split(" ", 0) line.split line " " 0 int N = Integer.valueOf(input[0]).intValue(); N Integer.valueOf(input[0]).intValue() Integer.valueOf(input[0]).intValue Integer.valueOf(input[0]) Integer.valueOf Integer input[0] input 0 int K = Integer.valueOf(input[1]).intValue(); K Integer.valueOf(input[1]).intValue() Integer.valueOf(input[1]).intValue Integer.valueOf(input[1]) Integer.valueOf Integer input[1] input 1 int[] bunbo = new int[N]; bunbo new int[N] N double result = 0.0; result 0.0 for(int i = 1; i < N+1; i++){
            int j = i;
            bunbo[i-1] = N;
            while(K > j) {
                j *= 2;
                bunbo[i-1] *= 2;
            }
            result += 1.0/bunbo[i-1];
        } int i = 1; int i = 1; i 1 i < N+1 i N+1 N 1 i++ i++ i {
            int j = i;
            bunbo[i-1] = N;
            while(K > j) {
                j *= 2;
                bunbo[i-1] *= 2;
            }
            result += 1.0/bunbo[i-1];
        } {
            int j = i;
            bunbo[i-1] = N;
            while(K > j) {
                j *= 2;
                bunbo[i-1] *= 2;
            }
            result += 1.0/bunbo[i-1];
        } int j = i; j i bunbo[i-1] = N bunbo[i-1] bunbo i-1 i 1 N while(K > j) {
                j *= 2;
                bunbo[i-1] *= 2;
            } K > j K j {
                j *= 2;
                bunbo[i-1] *= 2;
            } j *= 2 j 2 bunbo[i-1] *= 2 bunbo[i-1] bunbo i-1 i 1 2 result += 1.0/bunbo[i-1] result 1.0/bunbo[i-1] 1.0 bunbo[i-1] bunbo i-1 i 1 System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();

        String[] input = line.split(" ", 0);

        int N = Integer.valueOf(input[0]).intValue();
        int K = Integer.valueOf(input[1]).intValue();
        int[] bunbo = new int[N];
        double result = 0.0;

        for(int i = 1; i < N+1; i++){
            int j = i;
            bunbo[i-1] = N;
            while(K > j) {
                j *= 2;
                bunbo[i-1] *= 2;
            }
            result += 1.0/bunbo[i-1];
        }

        System.out.println(result);

    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();

        String[] input = line.split(" ", 0);

        int N = Integer.valueOf(input[0]).intValue();
        int K = Integer.valueOf(input[1]).intValue();
        int[] bunbo = new int[N];
        double result = 0.0;

        for(int i = 1; i < N+1; i++){
            int j = i;
            bunbo[i-1] = N;
            while(K > j) {
                j *= 2;
                bunbo[i-1] *= 2;
            }
            result += 1.0/bunbo[i-1];
        }

        System.out.println(result);

    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();

        String[] input = line.split(" ", 0);

        int N = Integer.valueOf(input[0]).intValue();
        int K = Integer.valueOf(input[1]).intValue();
        int[] bunbo = new int[N];
        double result = 0.0;

        for(int i = 1; i < N+1; i++){
            int j = i;
            bunbo[i-1] = N;
            while(K > j) {
                j *= 2;
                bunbo[i-1] *= 2;
            }
            result += 1.0/bunbo[i-1];
        }

        System.out.println(result);

    }
}