def main():
    N, K = map(int, input().split())

    ans = 0
    # i is point
    for i in range(1, N + 1):
        x = 0
        while i * (2 ** x) < K:
            x += 1
        ans += 1 / N * (0.5 ** x)

    print(ans)


if __name__ == '__main__':
    main() def main():
    N, K = map(int, input().split())

    ans = 0
    # i is point
    for i in range(1, N + 1):
        x = 0
        while i * (2 ** x) < K:
            x += 1
        ans += 1 / N * (0.5 ** x)

    print(ans) main N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K ans = 0 ans 0 for i in range(1, N + 1):
        x = 0
        while i * (2 ** x) < K:
            x += 1
        ans += 1 / N * (0.5 ** x)

     i range(1, N + 1) range 1 N + 1 N 1 x = 0 x 0 while i * (2 ** x) < K:
            x += 1
         i * (2 ** x) < K i * (2 ** x) i 2 ** x 2 x K x += 1 x 1 ans += 1 / N * (0.5 ** x) ans 1 / N * (0.5 ** x) 1 / N 1 N 0.5 ** x 0.5 x print(ans) print ans if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    N, K = map(int, input().split())

    ans = 0
    # i is point
    for i in range(1, N + 1):
        x = 0
        while i * (2 ** x) < K:
            x += 1
        ans += 1 / N * (0.5 ** x)

    print(ans) def main():
    N, K = map(int, input().split())

    ans = 0
    # i is point
    for i in range(1, N + 1):
        x = 0
        while i * (2 ** x) < K:
            x += 1
        ans += 1 / N * (0.5 ** x)

    print(ans) main
def main():
    N, K = map(int, input().split())

    ans = 0
    # i is point
    for i in range(1, N + 1):
        x = 0
        while i * (2 ** x) < K:
            x += 1
        ans += 1 / N * (0.5 ** x)

    print(ans)


if __name__ == '__main__':
    main()
