from itertools import accumulate

from collections import defaultdict





def main():

    n = int(eval(input()))

    prime_counter = defaultdict(int)

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



    def facs():

        yield 2

        for x in range(10 ** 6):

            yield x * 2 + 3



    for fac in facs():

        while n % fac == 0:

            n //= fac

            prime_counter[fac] += 1

        if fac * fac > n:

            break

    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 itertools import accumulate

from collections import defaultdict





def main():

    n = int(eval(input()))

    prime_counter = defaultdict(int)  # key ^ value

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



    def facs():

        yield 2

        for x in range(10 ** 5 * 5):

            yield x * 2 + 3



    for fac in facs():

        while n % fac == 0:

            n //= fac

            prime_counter[fac] += 1

            # ここで if braek を入れると遅い？

    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 itertools import accumulate
from collections import defaultdict


def main():
    n = int(eval(input()))
    prime_counter = defaultdict(int)
    acc = tuple(accumulate(list(range(1, 42))))  # 10^12 < 2^39

    def facs():
        yield 2
        for x in range(10**6):
            yield x * 2 + 3

    for fac in facs():
        while n % fac == 0:
            n //= fac
            prime_counter[fac] += 1
        if fac * fac > n:
            break
    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 itertools import accumulate
from collections import defaultdict


def main():
    n = int(eval(input()))
    prime_counter = defaultdict(int)  # key ^ value
    acc = tuple(accumulate(list(range(1, 42))))  # because 10^12 < 2^39

    def facs():
        yield 2
        for x in range(10**5 * 5):
            yield x * 2 + 3

    for fac in facs():
        while n % fac == 0:
            n //= fac
            prime_counter[fac] += 1
            # ここで if braek を入れると遅い？
    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()

-    prime_counter = defaultdict(int) -    acc = tuple(accumulate(list(range(1, 42))))  # 10^12 < 2^39 +    prime_counter = defaultdict(int)  # key ^ value +    acc = tuple(accumulate(list(range(1, 42))))  # because 10^12 < 2^39 -        for x in range(10**6): +        for x in range(10**5 * 5): -        if fac * fac > n: -            break +            # ここで if braek を入れると遅い？