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 fac * fac <= n:

            if n % fac == 0:

                n //= fac

                prime_counter[fac] += 1

            else:

                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)

    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)
    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 fac * fac <= n:
            if n % fac == 0:
                n //= fac
                prime_counter[fac] += 1
            else:
                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)
    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()

-        while fac * fac <= n: -            if n % fac == 0: -                n //= fac -                prime_counter[fac] += 1 -            else: -                break +        while n % fac == 0: +            n //= fac +            prime_counter[fac] += 1 +        if fac * fac > n: +            break