def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def func(i, k):
    count = 0
    while i < k:
        i *= 2
        count += 1
    return count


def main():
    n, k = Input()
    ans = 0
    for i in range(1, n+1):
        ans += 1/n * (1/2 ** func(i, k))
    print(ans)


main() def mapt(fn, *args):
    return tuple(map(fn, *args)) mapt return tuple(map(fn, *args)) tuple(map(fn, *args)) tuple map(fn, *args) map fn *args args fn fn *args def Input():
    return mapt(int, input().split(" ")) Input return mapt(int, input().split(" ")) mapt(int, input().split(" ")) mapt int input().split(" ") ().split () input split " " def func(i, k):
    count = 0
    while i < k:
        i *= 2
        count += 1
    return count func count = 0 count 0 while i < k:
        i *= 2
        count += 1
     i < k i k i *= 2 i 2 count += 1 count 1 return count count i i k k def main():
    n, k = Input()
    ans = 0
    for i in range(1, n+1):
        ans += 1/n * (1/2 ** func(i, k))
    print(ans) main n, k = Input() n Input() Input k ans = 0 ans 0 for i in range(1, n+1):
        ans += 1/n * (1/2 ** func(i, k))
     i range(1, n+1) range 1 n+1 n 1 ans += 1/n * (1/2 ** func(i, k)) ans 1/n * (1/2 ** func(i, k)) 1/n 1 n 1/2 ** func(i, k) 1 2 ** func(i, k) 2 func(i, k) func i k print(ans) print ans main() main def mapt(fn, *args):
    return tuple(map(fn, *args)) def mapt(fn, *args):
    return tuple(map(fn, *args)) mapt def func(i, k):
    count = 0
    while i < k:
        i *= 2
        count += 1
    return count def func(i, k):
    count = 0
    while i < k:
        i *= 2
        count += 1
    return count func def Input():
    return mapt(int, input().split(" ")) def Input():
    return mapt(int, input().split(" ")) Input def main():
    n, k = Input()
    ans = 0
    for i in range(1, n+1):
        ans += 1/n * (1/2 ** func(i, k))
    print(ans) def main():
    n, k = Input()
    ans = 0
    for i in range(1, n+1):
        ans += 1/n * (1/2 ** func(i, k))
    print(ans) main
def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def func(i, k):
    count = 0
    while i < k:
        i *= 2
        count += 1
    return count


def main():
    n, k = Input()
    ans = 0
    for i in range(1, n+1):
        ans += 1/n * (1/2 ** func(i, k))
    print(ans)


main()