

import java.math.BigDecimal;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int k = scanner.nextInt();

        double result = 0;

        for (int i = 1; i <= n; i++) {
            final double a = Math.log(k) / Math.log(2);
            final double b = Math.log(i) / Math.log(2);
            double ceil = Math.ceil(a - b);
            if(ceil < 0){
                ceil = 0;
            }
            final double pow = Math.pow(0.5, ceil);
            result += pow;
        }

        System.out.println(result / n);
    }
} import java.math.BigDecimal; BigDecimal java.math import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int k = scanner.nextInt();

        double result = 0;

        for (int i = 1; i <= n; i++) {
            final double a = Math.log(k) / Math.log(2);
            final double b = Math.log(i) / Math.log(2);
            double ceil = Math.ceil(a - b);
            if(ceil < 0){
                ceil = 0;
            }
            final double pow = Math.pow(0.5, ceil);
            result += pow;
        }

        System.out.println(result / n);
    }
} Main public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int k = scanner.nextInt();

        double result = 0;

        for (int i = 1; i <= n; i++) {
            final double a = Math.log(k) / Math.log(2);
            final double b = Math.log(i) / Math.log(2);
            double ceil = Math.ceil(a - b);
            if(ceil < 0){
                ceil = 0;
            }
            final double pow = Math.pow(0.5, ceil);
            result += pow;
        }

        System.out.println(result / n);
    } main {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int k = scanner.nextInt();

        double result = 0;

        for (int i = 1; i <= n; i++) {
            final double a = Math.log(k) / Math.log(2);
            final double b = Math.log(i) / Math.log(2);
            double ceil = Math.ceil(a - b);
            if(ceil < 0){
                ceil = 0;
            }
            final double pow = Math.pow(0.5, ceil);
            result += pow;
        }

        System.out.println(result / n);
    } final Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) final int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner final int k = scanner.nextInt(); k scanner.nextInt() scanner.nextInt scanner double result = 0; result 0 for (int i = 1; i <= n; i++) {
            final double a = Math.log(k) / Math.log(2);
            final double b = Math.log(i) / Math.log(2);
            double ceil = Math.ceil(a - b);
            if(ceil < 0){
                ceil = 0;
            }
            final double pow = Math.pow(0.5, ceil);
            result += pow;
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            final double a = Math.log(k) / Math.log(2);
            final double b = Math.log(i) / Math.log(2);
            double ceil = Math.ceil(a - b);
            if(ceil < 0){
                ceil = 0;
            }
            final double pow = Math.pow(0.5, ceil);
            result += pow;
        } {
            final double a = Math.log(k) / Math.log(2);
            final double b = Math.log(i) / Math.log(2);
            double ceil = Math.ceil(a - b);
            if(ceil < 0){
                ceil = 0;
            }
            final double pow = Math.pow(0.5, ceil);
            result += pow;
        } final double a = Math.log(k) / Math.log(2); a Math.log(k) / Math.log(2) Math.log(k) Math.log Math k Math.log(2) Math.log Math 2 final double b = Math.log(i) / Math.log(2); b Math.log(i) / Math.log(2) Math.log(i) Math.log Math i Math.log(2) Math.log Math 2 double ceil = Math.ceil(a - b); ceil Math.ceil(a - b) Math.ceil Math a - b a b if(ceil < 0){
                ceil = 0;
            } ceil < 0 ceil 0 {
                ceil = 0;
            } ceil = 0 ceil 0 final double pow = Math.pow(0.5, ceil); pow Math.pow(0.5, ceil) Math.pow Math 0.5 ceil result += pow result pow System.out.println(result / n) System.out.println System.out System System.out result / n result n String[] args args public class Main {
    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int k = scanner.nextInt();

        double result = 0;

        for (int i = 1; i <= n; i++) {
            final double a = Math.log(k) / Math.log(2);
            final double b = Math.log(i) / Math.log(2);
            double ceil = Math.ceil(a - b);
            if(ceil < 0){
                ceil = 0;
            }
            final double pow = Math.pow(0.5, ceil);
            result += pow;
        }

        System.out.println(result / n);
    }
} public class Main {
    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int k = scanner.nextInt();

        double result = 0;

        for (int i = 1; i <= n; i++) {
            final double a = Math.log(k) / Math.log(2);
            final double b = Math.log(i) / Math.log(2);
            double ceil = Math.ceil(a - b);
            if(ceil < 0){
                ceil = 0;
            }
            final double pow = Math.pow(0.5, ceil);
            result += pow;
        }

        System.out.println(result / n);
    }
} Main


import java.math.BigDecimal;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int k = scanner.nextInt();

        double result = 0;

        for (int i = 1; i <= n; i++) {
            final double a = Math.log(k) / Math.log(2);
            final double b = Math.log(i) / Math.log(2);
            double ceil = Math.ceil(a - b);
            if(ceil < 0){
                ceil = 0;
            }
            final double pow = Math.pow(0.5, ceil);
            result += pow;
        }

        System.out.println(result / n);
    }
}
