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


if __name__ == "__main__":
    main() def main():
    N, K = map(int, input().split())
    ans = 0
    for i in range(1, N + 1):
        tmp = 1 / N
        cnt = i
        while cnt < K:
            tmp /= 2
            cnt *= 2
        ans += tmp
    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):
        tmp = 1 / N
        cnt = i
        while cnt < K:
            tmp /= 2
            cnt *= 2
        ans += tmp
     i range(1, N + 1) range 1 N + 1 N 1 tmp = 1 / N tmp 1 / N 1 N cnt = i cnt i while cnt < K:
            tmp /= 2
            cnt *= 2
         cnt < K cnt K tmp /= 2 tmp 2 cnt *= 2 cnt 2 ans += tmp ans tmp print(ans) print ans if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    N, K = map(int, input().split())
    ans = 0
    for i in range(1, N + 1):
        tmp = 1 / N
        cnt = i
        while cnt < K:
            tmp /= 2
            cnt *= 2
        ans += tmp
    print(ans) def main():
    N, K = map(int, input().split())
    ans = 0
    for i in range(1, N + 1):
        tmp = 1 / N
        cnt = i
        while cnt < K:
            tmp /= 2
            cnt *= 2
        ans += tmp
    print(ans) main
def main():
    N, K = map(int, input().split())
    ans = 0
    for i in range(1, N + 1):
        tmp = 1 / N
        cnt = i
        while cnt < K:
            tmp /= 2
            cnt *= 2
        ans += tmp
    print(ans)


if __name__ == "__main__":
    main()
