Problem:
 Score : 400 points    Problem Statement  Given is a positive integer N . Consider repeatedly applying the operation below on N :   First, choose a positive integer z satisfying all of the conditions below:  z can be represented as z=p^e , where p is a prime number and e is a positive integer;  z divides N ;  z is different from all integers chosen in previous operations.    Then, replace N with N/z .   Find the maximum number of times the operation can be applied.      Constraints   All values in input are integers.  1 \leq N \leq 10^{12}         Input  Input is given from Standard Input in the following format:  N       Output  Print the maximum number of times the operation can be applied.        Sample Input 1 24      Sample Output 1 3  We can apply the operation three times by, for example, making the following choices:   Choose z=2 (=2^1) . (Now we have N=12 .)  Choose z=3 (=3^1) . (Now we have N=4 .)  Choose z=4 (=2^2) . (Now we have N=1 .)        Sample Input 2 1      Sample Output 2 0  We cannot apply the operation at all.       Sample Input 3 64      Sample Output 3 3  We can apply the operation three times by, for example, making the following choices:   Choose z=2 (=2^1) . (Now we have N=32 .)  Choose z=4 (=2^2) . (Now we have N=8 .)  Choose z=8 (=2^3) . (Now we have N=1 .)        Sample Input 4 1000000007      Sample Output 4 1  We can apply the operation once by, for example, making the following choice:   z=1000000007 (=1000000007^1) . (Now we have N=1 .)        Sample Input 5 997764507000      Sample Output 5 7

Solution (Python):
import sys
import heapq
import re
from itertools import permutations
from bisect import bisect_left, bisect_right
from collections import Counter, deque
from math import factorial, sqrt, ceil, gcd
from functools import lru_cache, reduce
INF = 1 << 60
MOD = 1000000007
sys.setrecursionlimit(10 ** 7)


class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())


def dijkstra_heap(s, edge, n):
    
    d = [10**20] * n
    used = [True] * n 
    d[s] = 0
    used[s] = False
    edgelist = []
    for a,b in edge[s]:
        heapq.heappush(edgelist,a*(10**6)+b)
    while len(edgelist):
        minedge = heapq.heappop(edgelist)
        
        if not used[minedge%(10**6)]:
            continue
        v = minedge%(10**6)
        d[v] = minedge//(10**6)
        used[v] = False
        for e in edge[v]:
            if used[e[1]]:
                heapq.heappush(edgelist,(e[0]+d[v])*(10**6)+e[1])
    return d


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr


def lcm(x, y):
    return (x * y) // gcd(x, y)


def lcm_list(numbers):
    return reduce(lcm, numbers, 1)


def gcd_list(numbers):
    return reduce(gcd, numbers)


def is_prime(n):
    if n <= 1:
        return False
    p = 2
    while True:
        if p ** 2 > n:
            break
        if n % p == 0:
            return False
        p += 1
    return True



def eratosthenes(limit):
    A = [i for i in range(2, limit+1)]
    P = []

    while True:
        prime = min(A)
        
        if prime > sqrt(limit):
            break
            
        P.append(prime)
            
        i = 0
        while i < len(A):
            if A[i] % prime == 0:
                A.pop(i)
                continue
            i += 1
            
    for a in A:
        P.append(a)
            
    return P


def permutation_with_duplicates(L):

    if L == []:
        return [[]]

    else:
        ret = []

        
        S = sorted(set(L))

        for i in S:

            data = L[:]
            data.remove(i)

            for j in permutation_with_duplicates(data):
                ret.append([i] + j)

        return ret



n = int(input())
primes = factorization(n)

ans = 0

    
    
for i in primes:
    if i[0] == 1:
        continue
    a = i[1]
    cnt = 0
    total = 0
    while total + cnt < a:
        total += cnt + 1
        cnt += 1
    ans += cnt
print(ans)

Solution (Python):
N = int(input())
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
ans = factorization(N)
index = [ans[i][1] for i in range(len(ans))]
k = 0
if N == 1:
  print('0')
else:
  
  for i in range(len(ans)):
    a = index[i]
    j = 1
    while a - j >=0:
      k += 1
      a -= j
      j += 1
  print(k)

Solution (Python):
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
n=int(input())
p=factorization(n)
ans=0
if n==1:
    print(0)
    exit()
for i in range(len(p)):
    k=1
    while p[i][1]>0:
        p[i][1]-=k
        if p[i][1]>=0:
            ans+=1
            k+=1
        else:
            break
print(ans)

Solution (Python):

N = int(input())


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

if N==1:
    print(0)
else:
    s=0
    d=factorization(N)
    for p in range(len(d)):
        i=1
        while(d[p][1]>0):
            if d[p][1]-i<0:
                d[p][1]=-1
            else:
                d[p][1]=d[p][1]-i
                s=s+1
                i=i+1
    print(s)

Solution (Python):


def keisan(n):
    s = 1
    cnt = 0
    while n > 0:
        n -= s
        cnt += 1
        s += 1

    if n < 0: return cnt-1
    else: return cnt

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr


N = int(input())

if N == 1:
    print(0)
    exit()

F = factorization(N)

ans = 0
for f in F:
    ans += keisan(f[1])

print(ans)

Solution (Python):
N = int(input())


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    return arr


res = factorization(N)
sum = 0

steps = [1]

for i in range(2, 300):
    steps.append(steps[-1] + i)

if len(res) == 0:
    print(0)
else:
    for fact in res:
        num = fact[-1]
        count = 0
        for s in steps:
            if s > num:
                break
            count += 1
            
        sum += count

    print(sum)

Solution (Python):
from collections import Counter

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return Counter(a)

def check(j):
    if j <= 2:
        return 1
    else:
        tmp = int((j * 2) ** 0.5)
        while 1:
            if tmp * (tmp + 1) <= j * 2:
                return tmp
            else:
                tmp -= 1
        


N = int(input())
ans = 0
for i, j in prime_factorize(N).items():
    ans += check(j)
print(ans)

Solution (Python):
"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

N = int(input())
if N ==1:
    print(0);exit()
A = factorization(N)
ans = 0
for p,n in A:
    for k in range(1,100):
        if n >= k:
            ans += 1
            n -= k
        else:break

print(ans)

Solution (Python):
A = int(input())

import sys

if A ==1:
    print(0)
    sys.exit()

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append(cnt)

    if temp!=1:
        arr.append(1)

    if arr==[]:
        arr.append(1)

    return arr

def counting(x):
    i = 1
    result = 0
    while i<=x:
        result +=1
        x -=i
        i +=1
    return result

arr = factorization(A)

result = 0
for i in range(len(arr)):
    result += counting(arr[i])

print(result)

Solution (Python):
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

def main():
    N = int(input())
    if N==1:
        print(0)
        exit()
    
    ret = factorization(N)
    ans = 0
    already = set()
    while len(ret) > 0:
        
        x = ret.pop()
        
        e = 1
        while e <= x[1]:
            p = x[0]**e
            if not p in already:
                already.add(p)
                break
            e += 1
        else:
            continue
        y = [x[0], x[1]-e]
        ans += 1
        if y[1] > 1:
            ret.append(y)
    print(ans)



if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

ele = factorization(n)
cnt = 0
for i in range(len(ele)):
    for j in range(1, ele[i][1]+1):
        if j*(j+1)/2 <= ele[i][1]:
            cnt += 1
        else:
            break
            
if n == 1:
    cnt = 0

print(cnt)

Solution (Python):
N = int(input())
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

X = factorization(N)

ans = 0
for a,b in X:
    tmp = 0
    for i in range(1,100):
        if b < i:
            break
        else:
            b -= i
            ans += 1
if N == 1:
    ans = 0
print(ans)

Solution (Python):
N = int(input())

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

import collections
c = collections.Counter(prime_factorize(N))

tmp = []
for i in range(1,40):
    tmp.append((1+i)*i//2)
import bisect
ans = 0
for i in list(c.values()):
    ans += bisect.bisect_right(tmp,i)
print(ans)

Solution (Python):
import collections
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

N=int(input())
c = collections.Counter(prime_factorize(N))

X=[]
for a in c.values():
    X.append(a)
def count(a):
    if 1<=a<=2:
        return 1
    elif 3<=a<=5:
        return 2
    elif 6<=a<=9:
        return 3
    elif 10<=a<=14:
        return 4
    elif 15<=a<=20:
        return 5
    elif 21<=a<=27:
        return 6
    elif 28<=a<=35:
        return 7
    elif 36<=a<=40:
        return 8

ans=0
for i in range(len(X)):
    ans+=count(X[i])
print(ans)

Solution (Python):
n = int(input())

i = 2
cur_n = n
cnt = []
while i * i <= n:
    z = 0
    while cur_n % i == 0:
        z += 1
        cur_n //= i
    if z:
        cnt.append(z)
    i += 1

if cur_n != 1:
    cnt.append(1)

'''
ans_table = [0]
for i in range(40):
    ans_table[i // 2] + 1

[0, 1, 2
'''


def get_ans(power):
    i = 1
    res = 0
    while res + i <= power:
        res += i
        i += 1
    return i - 1


ans = 0
for v in cnt:
    ans += get_ans(v)


print(ans)

Solution (Python):
n = int(input())
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
fact = factorization(n)


ans = 0
for a,b in fact:
    count = 0
    while True:
        count +=1
        if count*(count+1)/2>b:
            count-=1
            break
    ans += count
if n ==1:
    print(0)
else: 
    print(ans)

Solution (Python):
from math import sqrt
from collections import defaultdict
N = int(input())
factors = defaultdict(int)

upper = int(sqrt(N))
for p in range(2, upper + 1):
    while N % p == 0:
        factors[p] += 1
        N //= p
if N != 1:
    factors[N] = 1


result = 0
for p in factors:
    fp = factors[p]
    ti = 1
    while True:
        
        if fp >= ti:
            fp -= ti
            ti += 1
            result += 1
        else:
            break

print(result)

Solution (Python):
import math
N = int(input())
pf={}
m = N
for i in range(2,int(m**0.5)+1):
    while m%i==0:
        pf[i]=pf.get(i,0)+1
        m//=i
if m>1:pf[m]=1

total = 0
for v in pf.values():
    val = int((-1 + math.sqrt(1 + 8 * v))/2)
    total += val
print(total)

Solution (Python):
N = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

ans = 0
alr = set()
while True:
    divisors = set(make_divisors(N))
    diff = divisors.difference(alr)
    pos = list(diff)
    pos.sort()
    for num in pos:
        fact = prime_factorize(num)
        if len(set(fact)) == 1:
            alr.add(num)
            ans += 1
            N = N // num
            break
    else:
        break

print(ans)

Solution (Python):
from  collections import defaultdict

n=int(input())

def prime_factorize(n):
    d=defaultdict(int) 
    while n % 2 == 0:
        d[2]+=1
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            d[f]+=1
            n //= f
        else:
            f += 2
    if n != 1:
        d[n]+=1
    return d

u=prime_factorize(n) 
cnt=0
for key,value in u.items():
    r=10**12
    l=0 
    while r-l>1:
        mid=(r+l)//2
        if mid*(mid+1)//2<=value:
            l=mid 
        else:
            r=mid
    cnt+=l
print(cnt)

Solution (Python):
n = int(input())

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

lst = factorization(n)
res = 0
for elem1, elem2 in lst:
    cnt = 1
    if elem1 == 1:
        continue
    while elem2 >= cnt:
        elem2 -= cnt
        cnt += 1
        res += 1
print(res)

Solution (Python):
N = int(input())
num = []
import collections
for i in range(2,int(N**0.5)+1):
    while N%i==0:
        num.append(i)
        N //= i
if N != 1:
    num.append(N)
A = collections.Counter(num)
lis = []
num = 0
for i in range(1,10):
    num += i
    lis.append(num)
from bisect import bisect_left,bisect_right
ans = 0
num = 0
for v in A.values():
    num = bisect_right(lis,v)
    ans += num
print(ans)

Solution (Python):
def factorization(n):
    if(n == 1):
        return []
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

def solve(N):
    ans = 0
    arr_list = factorization(N)
    for arr in arr_list:
        prime = arr[0]
        times = arr[1]
        count = 1
        while True:
            times -= count
            if(times < 0):
                break
            ans += 1
            count += 1
    return ans







def main():
    N = int(input())
    print(solve(N))

main()

Solution (Python):
N = int(input())
if N == 1:
    print(0)
    exit()
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

K = factorization(N)
cnt = 0
for k in K:
    x = k[1]
    i = 1
    while True:
        if i * (i - 1) // 2 <= x < i * (i + 1) // 2:

            cnt += i-1
            break
        i += 1
print(cnt)

Solution (Python):
import collections
import itertools

def prime_factor(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a


N = int(input())
if N == 1:
    print(0)
    exit()
PP = prime_factor(N)

Pri = collections.Counter(PP)
values, counts = zip(*Pri.most_common())


L = max(counts)

num = range(L+1)
acu = list(itertools.accumulate(num))


ans = 0
for i in counts:
    for k in range(L+1):
        if acu[k] == i:
            ans += k
            break
        elif acu[k] > i:
            ans += k-1
            break
print(ans)

Solution (Python):
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
  
n = int(input())
ans = 0
if n == 1:
    print(0)
else:
    for i in range(len(factorization(n))):
        ch = 1
        loop = 1
        while ch <= factorization(n)[i][1]:
            ans += 1
            loop += 1
            ch = ch + loop

    print(ans)

Solution (Python):
from collections import Counter
n = int(input())
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
l = prime_factorize(n)
c = Counter(l)
l3 = []
for i in c.most_common():
    l3.append(i[1])
l2 = [i * (i + 1) // 2 for i in range(1, 10)]
ans = 0
for i in l3:
    for j in range(len(l2)):
        if l2[j] > i:
            ans += j
            break
print(ans)

Solution (Python):
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
n=int(input())
a=factorization(n)
ans=0
if a[0][0]==1:
  print(0)
else:
  for i in a:
    now=(2*i[1])**0.5
    now=int(now//1)
    while now*(now+1)<=2*i[1]:
      now+=1
    ans+=now-1
  print(ans)

Solution (Python):
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

n = int(input())
if n == 1:
    print(0)
    exit()

facts = factorization(n)
cnt = 0
for fact in facts:
    for i in range(1, 100000):
        if (fact[1] - i) < 0:
            break
        fact[1] -= i
        cnt += 1
print(cnt)

Solution (Python):
n=int(input())

def factorization(n):
    global a
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

soinsu = factorization(n)
a = len(soinsu)


ans = 0

for i in range(a):
    x = soinsu[i][1]
    for j in range(1,10**18):
        if x >= j:
            x = x-j
            ans += 1
        else:
            break

if n== 1:
    ans = 0


print (ans)

Solution (Python):
def prime_factors(n):
    i = 2
    factors = {}
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            if i not in factors:
                factors[i] = 0
            factors[i] += 1
    if n > 1:
        if n not in factors:
            factors[n] = 0
        factors[n] += 1
    return factors


def count(factor_count):
    result = 0
    for i in range(1, 10000000000):
        if factor_count < i :
            break
        result += 1
        factor_count -= i
    return result


def solve(n):
    ans = 0
    pfactors = prime_factors(n)
    for factor in pfactors:
        ans += count(pfactors[factor])
    return ans


n = int(input())
print(solve(n))

Solution (Python):
import numpy as np
N = int(input())

def factorization(n):
    if n == 1:
        return []

    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

Arr = factorization(N)

comp = []

for i in range(40):
    comp.append((i + 1) * (i + 2) / 2)

cn = np.array(comp)

Sum = 0

for arr in Arr:
    Sum += np.count_nonzero(arr[1] >= cn)
    
print(Sum)

Solution (Python):
n = int(input())



"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

s = factorization(n)
lis_num = len(s)
ans = 0
cout = 1

if n == 1:
	print(ans)
else:
	for i in range(lis_num):
		while s[i][1]-cout >=0:
			s[i][1]-=cout
			cout+=1
			ans+=1
		cout = 1
	print(ans)

Solution (Python):
import math
l=[]
def primeFactors(n): 
    while n % 2 == 0: 
        l.append(2)
        n = n / 2         
    for i in range(3,int(math.sqrt(n))+1,2): 
        while n % i== 0: 
            l.append(i)
            n = n / i 
             
    if n > 2: 
        l.append(n)

no=int(input())
d={}
primeFactors(no)
def count(n) : 
    return (-1 + math.sqrt(1 + 8 * n)) // 2; 

for i in range(len(l)):
	if l[i] in d:
		d[l[i]]+=1
	else:
		d[l[i]]=1
c=0

for u,v in d.items():
	c+=count(v)

print(int(c))

Solution (Python):
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
n=int(input())
a=factorization(n)
ans=0
if a[0][0]==1:
  print(0)
else:
  for i in a:
    now=(2*i[1])**0.5
    now=int(now//1)
    while now*(now+1)<=2*i[1]:
      now+=1
    ans+=now-1
  print(ans)

Solution (Python):
import math


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
n = int(input())
a = factorization(n)
if a[0][0] == 1:
    print(0)
else:
    b = []
    c = [0,1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190]
    for i in range(len(a)):
        b.append(a[i][1])
    ans = 0
    for i in range(len(b)):
        for j in range(len(c)):
            if b[i] == c[j]:
                ans +=j
                break
            elif b[i] < c[j]:
                ans += j-1
                break
                
    print(ans)

Solution (Python):
import collections
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
n = int(input())
c = collections.Counter(prime_factorize(n))


ans = 0
for x in c.values():
    for i in range(1,100):
        
        if(x-i >= 0):
            ans += 1
            x -= i
print(ans)

Solution (Python):
import collections

N = int(input())

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

c = collections.Counter(prime_factorize(N))
result = 0
for i in list(c.values()):
    j = 1
    if i == 1:
        result += 1
    else:
        while i >= j:
            i = i - j
            result += 1
            j += 1
print(result)

Solution (Python):
import math
import sys
import collections

n = int(input())

if n == 1:
    print(0)
    sys.exit()
a = []
while n % 2 == 0:
    a.append(2)
    n //= 2
f = 3
while f * f <= n:
    if n % f == 0:
        a.append(f)
        n //= f
    else:
        f += 2
if n != 1:
    a.append(n)
c = collections.Counter(a)
list = c.values()
ANS = 0
for l in list:
    i = 1
    cnt = 1
    while l >= cnt:
        ANS += 1
        i += 1
        cnt += i
print(ANS)

Solution (Python):
import sys

stdin = sys.stdin
inf = 1 << 60
mod = 1000000007

sys.setrecursionlimit(10**7)

ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

n = ni()

def prime_factorization(n):
    i = 2
    res = []
    while i * i <= n:
        if n % i != 0:
            i += 1
            continue
        ex = 0
        while n % i == 0:
            ex += 1
            n //= i
        res.append((i, ex))
    if n != 1:
        res.append((n, 1))
    return res

ans = 0
fac = prime_factorization(n)
for a, ex in fac:
    i = 1
    while ex - i >= 0:
        ans += 1
        ex -= i
        i += 1

print(ans)

Solution (Python):
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append(cnt)

    if temp!=1:
        arr.append(1)

    if arr==[]:
        arr.append(1)

    return arr
ans=0
n=int(input())
L=factorization(n)
if n>1:
    for l in L:
        tmp=l
        for i in range(1,l+1):
            tmp-=i
            if tmp>=0:
                ans+=1
            if tmp<=0:
                break
print(ans)

Solution (Python):
from collections import Counter
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
  
n = int(input())
A = prime_factorize(n)
C = Counter(A)

S = []
s = 0
for i in range(1,50):
  s += i  
  S.append(s)
  
def count(n):
  for i in range(50-1):
    if n < S[i]:
      return i    

ans = 0
for k,v in C.items():
  ans += count(v)
  
print(ans)

Solution (Python):
import numpy as np
dict = {}
N = int(input())
def search(n):
    if n == 1:
        return
    else:
        s = int(np.sqrt(n)//1)
        for i in range(2, s+1):
            if n % i == 0:
                global dict
                dict[i] = dict.get(i, 0) + 1
                search(int(n/i))
                break
        else:
            dict[n] = dict.get(n, 0) + 1
search(N)
ans = 0
for i in dict.keys():
    n = dict[i]
    j = 1
    while n > 0:
        n -= j
        j += 1
        if n >= 0:
            ans += 1
print(ans)