import java.util.*;

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

        double sum = 0;
        final double base = 0.5;
        final double base2 = 1/(double)n;
        for (int deme = 1;deme <= n;++deme)
        {
            int nn = 0;
            int s = deme;
            while (s < k)
            {
                s *= 2;
                ++nn;
            }
            sum += base2*Math.pow(base,nn);
        }
        System.out.println(sum);
        sc.close();
    }
} import java.util.*; util.* java public class Main
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int k = sc.nextInt();

        double sum = 0;
        final double base = 0.5;
        final double base2 = 1/(double)n;
        for (int deme = 1;deme <= n;++deme)
        {
            int nn = 0;
            int s = deme;
            while (s < k)
            {
                s *= 2;
                ++nn;
            }
            sum += base2*Math.pow(base,nn);
        }
        System.out.println(sum);
        sc.close();
    }
} Main public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int k = sc.nextInt();

        double sum = 0;
        final double base = 0.5;
        final double base2 = 1/(double)n;
        for (int deme = 1;deme <= n;++deme)
        {
            int nn = 0;
            int s = deme;
            while (s < k)
            {
                s *= 2;
                ++nn;
            }
            sum += base2*Math.pow(base,nn);
        }
        System.out.println(sum);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int k = sc.nextInt();

        double sum = 0;
        final double base = 0.5;
        final double base2 = 1/(double)n;
        for (int deme = 1;deme <= n;++deme)
        {
            int nn = 0;
            int s = deme;
            while (s < k)
            {
                s *= 2;
                ++nn;
            }
            sum += base2*Math.pow(base,nn);
        }
        System.out.println(sum);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc final int k = sc.nextInt(); k sc.nextInt() sc.nextInt sc double sum = 0; sum 0 final double base = 0.5; base 0.5 final double base2 = 1/(double)n; base2 1/(double)n 1 (double)n for (int deme = 1;deme <= n;++deme)
        {
            int nn = 0;
            int s = deme;
            while (s < k)
            {
                s *= 2;
                ++nn;
            }
            sum += base2*Math.pow(base,nn);
        } int deme = 1; int deme = 1; deme 1 deme <= n deme n ++deme ++deme deme {
            int nn = 0;
            int s = deme;
            while (s < k)
            {
                s *= 2;
                ++nn;
            }
            sum += base2*Math.pow(base,nn);
        } {
            int nn = 0;
            int s = deme;
            while (s < k)
            {
                s *= 2;
                ++nn;
            }
            sum += base2*Math.pow(base,nn);
        } int nn = 0; nn 0 int s = deme; s deme while (s < k)
            {
                s *= 2;
                ++nn;
            } s < k s k {
                s *= 2;
                ++nn;
            } s *= 2 s 2 ++nn nn sum += base2*Math.pow(base,nn) sum base2*Math.pow(base,nn) base2 Math.pow(base,nn) Math.pow Math base nn System.out.println(sum) System.out.println System.out System System.out sum sc.close() sc.close sc String[] args args public class Main
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int k = sc.nextInt();

        double sum = 0;
        final double base = 0.5;
        final double base2 = 1/(double)n;
        for (int deme = 1;deme <= n;++deme)
        {
            int nn = 0;
            int s = deme;
            while (s < k)
            {
                s *= 2;
                ++nn;
            }
            sum += base2*Math.pow(base,nn);
        }
        System.out.println(sum);
        sc.close();
    }
} public class Main
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int k = sc.nextInt();

        double sum = 0;
        final double base = 0.5;
        final double base2 = 1/(double)n;
        for (int deme = 1;deme <= n;++deme)
        {
            int nn = 0;
            int s = deme;
            while (s < k)
            {
                s *= 2;
                ++nn;
            }
            sum += base2*Math.pow(base,nn);
        }
        System.out.println(sum);
        sc.close();
    }
} Main
import java.util.*;

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

        double sum = 0;
        final double base = 0.5;
        final double base2 = 1/(double)n;
        for (int deme = 1;deme <= n;++deme)
        {
            int nn = 0;
            int s = deme;
            while (s < k)
            {
                s *= 2;
                ++nn;
            }
            sum += base2*Math.pow(base,nn);
        }
        System.out.println(sum);
        sc.close();
    }
}