using System;
using static System.Console;
using System.Text;
using System.Linq;
using static System.Math;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.IO;
using System.Diagnostics;

class Program
{
    public static cp alg;
    public static long[] A;
    public static long k;
    public static long n;
    public static double num = 0;
    static void Main(string[] args)
    {
        alg = new cp();
        A = alg.inputSplitlong();
        n = A[0];
        k = A[1];
        for (long a = 1; a <=n; a++)
        {
            double temp = 1.0;
            long now = a;
            while (now < k)
            {
                now *= 2;
                temp /= 2;
            }
            num += temp/n;
        }
        WriteLine(num);

    }
}

class cp
{

    public cp()
    {
    }
    public long GCD(long a, long b)
    {
        return a % b == 0 ? b : GCD(b, a % b);
    }
    public long LCM(long a, long b)
    {
        return a * b / GCD(a, b);
    }
    public long countString(string s, string key)
    {
        return (s.Length - s.Replace(key, "").Length) / key.Length;
    }
    public string Yn(bool f)
    {
        if (f)
        {
            return "Yes";
        }
        else
        {
            return "No";
        }
    }
    public string YN(bool f)
    {
        if (f)
        {
            return "YES";
        }
        else
        {
            return "NO";
        }
    }
    public string yn(bool f)
    {
        if (f)
        {
            return "yes";
        }
        else
        {
            return "no";
        }
    }
    public void inputSkip()
    {
        ReadLine();
        return;
    }
    public string inputString()
    {
        return ReadLine();
    }
    public string[] inputSplitString()
    {
        return ReadLine().Split();
    }
    public string[] inputLinesString(long len)
    {
        var arr = new string[len];
        for (long a = 0; a < len; a++)
        {
            arr[a] = ReadLine();
        }
        return arr;
    }
    public string[][] inputJaggedArrayString(long len)
    {
        var arr = new string[len][];
        for (long a = 0; a < len; a++)
        {
            arr[a] = ReadLine().Split();
        }
        return arr;
    }
    public long inputlong()
    {
        return long.Parse(ReadLine());
    }
    public long[] inputSplitlong()
    {
        return ReadLine().Split().Select(i => long.Parse(i)).ToArray();
    }
    public long[] inputLineslong(long len)
    {
        var arr = new long[len];
        for (long a = 0; a < len; a++)
        {
            arr[a] = long.Parse(ReadLine());
        }
        return arr;
    }
    public long[][] inputJaggedArraylong(long len)
    {
        var arr = new long[len][];
        for (long a = 0; a < len; a++)
        {
            arr[a] = ReadLine().Split().Select(i => long.Parse(i)).ToArray();
        }
        return arr;
    }
    public long inputLong()
    {
        return long.Parse(ReadLine());
    }
    public long[] inputSplitLong()
    {
        return ReadLine().Split().Select(i => long.Parse(i)).ToArray();
    }
    public long[] inputLinesLong(long len)
    {
        var arr = new long[len];
        for (long a = 0; a < len; a++)
        {
            arr[a] = long.Parse(ReadLine());
        }
        return arr;
    }
    public long[][] inputJaggedArrayLong(long len)
    {
        var arr = new long[len][];
        for (long a = 0; a < len; a++)
        {
            arr[a] = ReadLine().Split().Select(i => long.Parse(i)).ToArray();
        }
        return arr;
    }
    public double inputDouble()
    {
        return double.Parse(ReadLine());
    }
    public double[] inputSplitDouble()
    {
        return ReadLine().Split().Select(i => double.Parse(i)).ToArray();
    }
    public double[] inputLinesDouble(long len)
    {
        var arr = new double[len];
        for (long a = 0; a < len; a++)
        {
            arr[a] = double.Parse(ReadLine());
        }
        return arr;
    }
    public double[][] inputJaggedArrayDouble(long len)
    {
        var arr = new double[len][];
        for (long a = 0; a < len; a++)
        {
            arr[a] = ReadLine().Split().Select(i => double.Parse(i)).ToArray();
        }
        return arr;
    }
}

Measured memory_bytes: 13396