import sys
# sys.setrecursionlimit(100000)


def input():
    return sys.stdin.readline().strip()


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def main():
    n, k = input_int_list()
    ans = 0
    for i in range(1, n + 1):
        start = i
        cnt = 0
        while start < k:
            start *= 2
            cnt += 1
        ans += 1 / (n * 2**cnt)
    print(ans)
    return


if __name__ == "__main__":
    main() import sys sys def input():
    return sys.stdin.readline().strip() input return sys.stdin.readline().strip() sys.stdin.readline().strip() sys.stdin.readline().strip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline strip def input_int():
    return int(input()) input_int return int(input()) int(input()) int input() input def input_int_list():
    return [int(i) for i in input().split()] input_int_list int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i return [int(i) for i in input().split()] [int(i) for i in input().split()] def main():
    n, k = input_int_list()
    ans = 0
    for i in range(1, n + 1):
        start = i
        cnt = 0
        while start < k:
            start *= 2
            cnt += 1
        ans += 1 / (n * 2**cnt)
    print(ans)
    return main n, k = input_int_list() n input_int_list() input_int_list k ans = 0 ans 0 for i in range(1, n + 1):
        start = i
        cnt = 0
        while start < k:
            start *= 2
            cnt += 1
        ans += 1 / (n * 2**cnt)
     i range(1, n + 1) range 1 n + 1 n 1 start = i start i cnt = 0 cnt 0 while start < k:
            start *= 2
            cnt += 1
         start < k start k start *= 2 start 2 cnt += 1 cnt 1 ans += 1 / (n * 2**cnt) ans 1 / (n * 2**cnt) 1 n * 2**cnt n 2**cnt 2 cnt print(ans) print ans return if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def input_int():
    return int(input()) def input_int():
    return int(input()) input_int def main():
    n, k = input_int_list()
    ans = 0
    for i in range(1, n + 1):
        start = i
        cnt = 0
        while start < k:
            start *= 2
            cnt += 1
        ans += 1 / (n * 2**cnt)
    print(ans)
    return def main():
    n, k = input_int_list()
    ans = 0
    for i in range(1, n + 1):
        start = i
        cnt = 0
        while start < k:
            start *= 2
            cnt += 1
        ans += 1 / (n * 2**cnt)
    print(ans)
    return main def input():
    return sys.stdin.readline().strip() def input():
    return sys.stdin.readline().strip() input def input_int_list():
    return [int(i) for i in input().split()] def input_int_list():
    return [int(i) for i in input().split()] input_int_list
import sys
# sys.setrecursionlimit(100000)


def input():
    return sys.stdin.readline().strip()


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def main():
    n, k = input_int_list()
    ans = 0
    for i in range(1, n + 1):
        start = i
        cnt = 0
        while start < k:
            start *= 2
            cnt += 1
        ans += 1 / (n * 2**cnt)
    print(ans)
    return


if __name__ == "__main__":
    main()
