from collections import defaultdict

from itertools import accumulate





def main():

    n = int(eval(input()))

    prime_counter = defaultdict(int)

    acc = tuple(accumulate(list(range(1, 42))))  # 10^12 < 2^39



    f = 2

    while f * f <= n:

        if n % f == 0:

            n //= f

            prime_counter[f] += 1

        else:

            f += 1

    if n != 1:

        prime_counter[n] += 1



    ans = 0

    for c in list(prime_counter.values()):

        for i, x in enumerate(acc):

            if c < x:

                tmp = i

                break

        ans += tmp

    print(ans)





if __name__ == '__main__':

    main()

from collections import defaultdict

from itertools import accumulate





def main():

    n = int(eval(input()))

    prime_counter = defaultdict(int)

    acc = tuple(accumulate(list(range(1, 42))))  # 10^12 < 2^39



    f = 2

    while n % f == 0:

        n //= f

        prime_counter[f] += 1

    f = 3

    while f * f <= n:

        if n % f == 0:

            n //= f

            prime_counter[f] += 1

        else:

            f += 2

    if n != 1:

        prime_counter[n] += 1



    ans = 0

    for c in list(prime_counter.values()):

        for accum_index, x in enumerate(acc):

            if c < x:

                break

        ans += accum_index

    print(ans)





if __name__ == '__main__':

    main()

from collections import defaultdict
from itertools import accumulate


def main():
    n = int(eval(input()))
    prime_counter = defaultdict(int)
    acc = tuple(accumulate(list(range(1, 42))))  # 10^12 < 2^39
    f = 2
    while f * f <= n:
        if n % f == 0:
            n //= f
            prime_counter[f] += 1
        else:
            f += 1
    if n != 1:
        prime_counter[n] += 1
    ans = 0
    for c in list(prime_counter.values()):
        for i, x in enumerate(acc):
            if c < x:
                tmp = i
                break
        ans += tmp
    print(ans)


if __name__ == "__main__":
    main()

from collections import defaultdict
from itertools import accumulate


def main():
    n = int(eval(input()))
    prime_counter = defaultdict(int)
    acc = tuple(accumulate(list(range(1, 42))))  # 10^12 < 2^39
    f = 2
    while n % f == 0:
        n //= f
        prime_counter[f] += 1
    f = 3
    while f * f <= n:
        if n % f == 0:
            n //= f
            prime_counter[f] += 1
        else:
            f += 2
    if n != 1:
        prime_counter[n] += 1
    ans = 0
    for c in list(prime_counter.values()):
        for accum_index, x in enumerate(acc):
            if c < x:
                break
        ans += accum_index
    print(ans)


if __name__ == "__main__":
    main()

+    while n % f == 0: +        n //= f +        prime_counter[f] += 1 +    f = 3 -            f += 1 +            f += 2 -        for i, x in enumerate(acc): +        for accum_index, x in enumerate(acc): -                tmp = i -        ans += tmp +        ans += accum_index