from functools import reduce

from operator import mul

import math





def end_of_loop():

    raise StopIteration





def main():

    N, K = list(map(int, input().split()))

    print((sum(reduce(mul, (0.5

                           if i << j < K

                           else end_of_loop()

                           for j in range(int(math.log2(K))+2)), 1 / N)

              for i in range(1, N + 1))))

    return





main()

from functools import reduce

from operator import mul





def end_of_loop():

    raise StopIteration





def main():

    N, K = list(map(int, input().split()))

    print((sum(reduce(mul, (0.5

                           if i << j < K

                           else end_of_loop()

                           for j in range(K)), 1 / N)

              for i in range(1, N + 1))))

    return





main()

from functools import reduce
from operator import mul
import math


def end_of_loop():
    raise StopIteration


def main():
    N, K = list(map(int, input().split()))
    print(
        (
            sum(
                reduce(
                    mul,
                    (
                        0.5 if i << j < K else end_of_loop()
                        for j in range(int(math.log2(K)) + 2)
                    ),
                    1 / N,
                )
                for i in range(1, N + 1)
            )
        )
    )
    return


main()

from functools import reduce
from operator import mul


def end_of_loop():
    raise StopIteration


def main():
    N, K = list(map(int, input().split()))
    print(
        (
            sum(
                reduce(
                    mul, (0.5 if i << j < K else end_of_loop() for j in range(K)), 1 / N
                )
                for i in range(1, N + 1)
            )
        )
    )
    return


main()

-import math -                    mul, -                    ( -                        0.5 if i << j < K else end_of_loop() -                        for j in range(int(math.log2(K)) + 2) -                    ), -                    1 / N, +                    mul, (0.5 if i << j < K else end_of_loop() for j in range(K)), 1 / N