import sys

input = sys.stdin.readline


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

    ans = 0
    for n in range(1, N + 1):
        cnt = 0
        while n < K:
            n *= 2
            cnt += 1
        ans += (1 / 2 ** cnt)

    ans /= N
    print(ans)


if __name__ == "__main__":
    main() import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline def main():
    N, K = map(int, input().split())

    ans = 0
    for n in range(1, N + 1):
        cnt = 0
        while n < K:
            n *= 2
            cnt += 1
        ans += (1 / 2 ** cnt)

    ans /= N
    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 n in range(1, N + 1):
        cnt = 0
        while n < K:
            n *= 2
            cnt += 1
        ans += (1 / 2 ** cnt)

     n range(1, N + 1) range 1 N + 1 N 1 cnt = 0 cnt 0 while n < K:
            n *= 2
            cnt += 1
         n < K n K n *= 2 n 2 cnt += 1 cnt 1 ans += (1 / 2 ** cnt) ans 1 / 2 ** cnt 1 2 ** cnt 2 cnt ans /= N ans N print(ans) print ans if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main input = sys.stdin.readline sys.stdin.readline input def main():
    N, K = map(int, input().split())

    ans = 0
    for n in range(1, N + 1):
        cnt = 0
        while n < K:
            n *= 2
            cnt += 1
        ans += (1 / 2 ** cnt)

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

    ans = 0
    for n in range(1, N + 1):
        cnt = 0
        while n < K:
            n *= 2
            cnt += 1
        ans += (1 / 2 ** cnt)

    ans /= N
    print(ans) main
import sys

input = sys.stdin.readline


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

    ans = 0
    for n in range(1, N + 1):
        cnt = 0
        while n < K:
            n *= 2
            cnt += 1
        ans += (1 / 2 ** cnt)

    ans /= N
    print(ans)


if __name__ == "__main__":
    main()
