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(n):

        yield 2

        max_x = int((n ** 0.5 - 3) / 2 + 1)

        for x in range(max_x):

            yield x * 2 + 3



    for fac in facs(n):

        while n % fac == 0:

            n //= fac

            prime_counter[fac] += 1

            # ここで if fac * fac > n: 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)  # key ^ value

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



    def facs(n):

        yield 2

        max_x = int(n ** 0.5)

        for x in range(3, max_x+1, 2):

            yield x



    for fac in facs(n):

        while n % fac == 0:

            n //= fac

            prime_counter[fac] += 1

            # ここで if fac * fac > n: 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)  # key ^ value
    acc = tuple(accumulate(list(range(1, 42))))  # because 10^12 < 2^39

    def facs(n):
        yield 2
        max_x = int((n**0.5 - 3) / 2 + 1)
        for x in range(max_x):
            yield x * 2 + 3

    for fac in facs(n):
        while n % fac == 0:
            n //= fac
            prime_counter[fac] += 1
            # ここで if fac * fac > n: 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)  # key ^ value
    acc = tuple(accumulate(list(range(1, 42))))  # because 10^12 < 2^39

    def facs(n):
        yield 2
        max_x = int(n**0.5)
        for x in range(3, max_x + 1, 2):
            yield x

    for fac in facs(n):
        while n % fac == 0:
            n //= fac
            prime_counter[fac] += 1
            # ここで if fac * fac > n: 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()

-        max_x = int((n**0.5 - 3) / 2 + 1) -        for x in range(max_x): -            yield x * 2 + 3 +        max_x = int(n**0.5) +        for x in range(3, max_x + 1, 2): +            yield x