
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer N = Integer.parseInt(scanner.next());
        Integer K = Integer.parseInt(scanner.next());

        Integer count = 0;
        Double total = 0.0;
        for (int i = 1; i < N+1; i++) {
            Integer ii = i;
            while(ii < K) {
                ii*=2;
                count++;
            }
            total += (double)1/N * Math.pow((double)1/2,count);

            // 初期化
            ii = i;
            count = 0;
        }


        System.out.println(total);
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer N = Integer.parseInt(scanner.next());
        Integer K = Integer.parseInt(scanner.next());

        Integer count = 0;
        Double total = 0.0;
        for (int i = 1; i < N+1; i++) {
            Integer ii = i;
            while(ii < K) {
                ii*=2;
                count++;
            }
            total += (double)1/N * Math.pow((double)1/2,count);

            // 初期化
            ii = i;
            count = 0;
        }


        System.out.println(total);
    }
} Main public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer N = Integer.parseInt(scanner.next());
        Integer K = Integer.parseInt(scanner.next());

        Integer count = 0;
        Double total = 0.0;
        for (int i = 1; i < N+1; i++) {
            Integer ii = i;
            while(ii < K) {
                ii*=2;
                count++;
            }
            total += (double)1/N * Math.pow((double)1/2,count);

            // 初期化
            ii = i;
            count = 0;
        }


        System.out.println(total);
    } main {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer N = Integer.parseInt(scanner.next());
        Integer K = Integer.parseInt(scanner.next());

        Integer count = 0;
        Double total = 0.0;
        for (int i = 1; i < N+1; i++) {
            Integer ii = i;
            while(ii < K) {
                ii*=2;
                count++;
            }
            total += (double)1/N * Math.pow((double)1/2,count);

            // 初期化
            ii = i;
            count = 0;
        }


        System.out.println(total);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) Integer N = Integer.parseInt(scanner.next()); N Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner Integer K = Integer.parseInt(scanner.next()); K Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner Integer count = 0; count 0 Double total = 0.0; total 0.0 for (int i = 1; i < N+1; i++) {
            Integer ii = i;
            while(ii < K) {
                ii*=2;
                count++;
            }
            total += (double)1/N * Math.pow((double)1/2,count);

            // 初期化
            ii = i;
            count = 0;
        } int i = 1; int i = 1; i 1 i < N+1 i N+1 N 1 i++ i++ i {
            Integer ii = i;
            while(ii < K) {
                ii*=2;
                count++;
            }
            total += (double)1/N * Math.pow((double)1/2,count);

            // 初期化
            ii = i;
            count = 0;
        } {
            Integer ii = i;
            while(ii < K) {
                ii*=2;
                count++;
            }
            total += (double)1/N * Math.pow((double)1/2,count);

            // 初期化
            ii = i;
            count = 0;
        } Integer ii = i; ii i while(ii < K) {
                ii*=2;
                count++;
            } ii < K ii K {
                ii*=2;
                count++;
            } ii*=2 ii 2 count++ count total += (double)1/N * Math.pow((double)1/2,count) total (double)1/N * Math.pow((double)1/2,count) (double)1/N (double)1 N Math.pow((double)1/2,count) Math.pow Math (double)1/2 (double)1 2 count ii = i ii i count = 0 count 0 System.out.println(total) System.out.println System.out System System.out total String[] args args public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer N = Integer.parseInt(scanner.next());
        Integer K = Integer.parseInt(scanner.next());

        Integer count = 0;
        Double total = 0.0;
        for (int i = 1; i < N+1; i++) {
            Integer ii = i;
            while(ii < K) {
                ii*=2;
                count++;
            }
            total += (double)1/N * Math.pow((double)1/2,count);

            // 初期化
            ii = i;
            count = 0;
        }


        System.out.println(total);
    }
} public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer N = Integer.parseInt(scanner.next());
        Integer K = Integer.parseInt(scanner.next());

        Integer count = 0;
        Double total = 0.0;
        for (int i = 1; i < N+1; i++) {
            Integer ii = i;
            while(ii < K) {
                ii*=2;
                count++;
            }
            total += (double)1/N * Math.pow((double)1/2,count);

            // 初期化
            ii = i;
            count = 0;
        }


        System.out.println(total);
    }
} Main

import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer N = Integer.parseInt(scanner.next());
        Integer K = Integer.parseInt(scanner.next());

        Integer count = 0;
        Double total = 0.0;
        for (int i = 1; i < N+1; i++) {
            Integer ii = i;
            while(ii < K) {
                ii*=2;
                count++;
            }
            total += (double)1/N * Math.pow((double)1/2,count);

            // 初期化
            ii = i;
            count = 0;
        }


        System.out.println(total);
    }
}
