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-----
24

-----Sample Output-----
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.)

Difficulty: interview

Starter code:

Solutions:
def division(n):
    if n < 2:
        return []
    prime_fac = []
    for i in range(2,int(n**0.5)+1):
        cnt = 0
        while n % i == 0:
            n //= i
            cnt += 1
        if cnt!=0:prime_fac.append((i,cnt))
    if n > 1:
        prime_fac.append((n,1))
    return prime_fac

n = int(input())
div = division(n)
ans = 0
for i,e in div:
    b = 1
    while b <= e:
        e -= b
        b += 1
        ans += 1
print(ans)


from collections import Counter
import math
N = int(input())
Nso = []
Nruto = math.sqrt(N)
Nruto = math.floor(Nruto)
for i in range(2, Nruto+1):
    while N % i == 0:
        N = N//i
        Nso.append(i)
    if N == 1:
        break
    Nruto = math.sqrt(N)
    Nruto = math.floor(Nruto)
Nso.append(N)
if 1 in Nso:
    Nso.remove(1)
Nso = Counter(Nso)
ans = 0
for v in list(Nso.values()):
    count = 0
    for i in range(1, v+1):
        if count+i > v:
            break
        else:
            count += i
            ans += 1

print(ans)


n=int(input())
def f(x):
    z=1
    while not(z*(z+1)<=2*x<(z+1)*(z+2)):
        z+=1
    return z

x=[-1]*(10**6+1) #2以上の自然数に対して最小の素因数を表す
x[0]=0
x[1]=1
i=2
prime=[]
while i<=10**6:
    if x[i]==-1:
        x[i]=i
        prime.append(i)
    for j in prime:
        if i*j>10**6 or j>x[i]:break
        x[j*i]=j
    i+=1
if n==1:
    print((0))
    return

a=[]
q=0
for i in range(len(prime)):
    p=prime[i]
    while n%p==0:
        q+=1
        n=n//p
    if q>0:a.append(q)
    q=0

ans=0
for i in range(len(a)):
    ans+=f(a[i])
print((ans if n==1 else ans+1))


import collections

#https://note.nkmk.me/python-prime-factorization/
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

def f(n):
    for i in range(1,20):
        if n<(i*(i+1))//2:
            return i-1

n = int(input())
c = collections.Counter(prime_factorize(n))
ans = 0
for i in c.keys():
    ans += f(c[i])
print(ans)

import math
from collections import defaultdict
from itertools import accumulate
N=int(input())
data=defaultdict(int)
result=0
for i in range(2,int(math.sqrt(N))+1):
    while N%i==0:
        N//=i
        data[i]+=1
if N!=1:
    data[N]+=1
cumsum=list(accumulate(range(1,10**6*2)))
for value in data.values():
    for i in range(10**6*2):
        if value<cumsum[i]:
            result+=i
            break
if result==0:
    if N!=1:
        result=1
print(result)

from collections import Counter

def prime_fact(num):
    prime = []
    for i in range(2, int(num ** 0.5) + 1):
        while num % i == 0:
            prime.append(i)
            num //= i
    if num != 1:
        prime.append(num)
    return prime

n = int(input())
cnt = Counter(prime_fact(n))

ans = 0
for c in cnt.values():
    tmp = 1
    while c >= tmp:
        c -= tmp
        ans += 1
        tmp += 1      
print(ans)

n = int(input())
temp = []
for i in range(2, int(n ** 0.5)+2):
  if n % i == 0:
    temp.append([i, 0])
    while(n % i == 0):
      n /= i
      temp[-1][1] += 1
else:
  if n != 1:
    temp.append([n, 1])
#print(temp)
ans = 0
for i in range(len(temp)):
  count = 1
  while(temp[i][1] >= count):
    ans += 1
    temp[i][1] -= count
    count += 1
if len(temp) == 0:
  print((0))
else:
  print(ans)


N = int(input())
pri_cnt = {}
n = N
i = 2

while i ** 2 <= N:
  while n % i == 0:
    if i not in pri_cnt:
      pri_cnt[i] = 1
    else:
      pri_cnt[i] += 1
    n = n / i
  if (i == 2):
    i += 1
  else:
    i += 2

if n > 1:
  pri_cnt[int(n)] = 1

ans = 0
for pri, cnt in pri_cnt.items():
  count = 1
  remain = cnt
  while remain >= count:
    ans += 1
    remain -= count
    count += 1
print(ans)

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy,bisect
#from operator import itemgetter
#from heapq import heappush, heappop
#import numpy as np
#from scipy.sparse.csgraph import breadth_first_order, depth_first_order, shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
#from scipy.sparse import csr_matrix
#from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
import sys

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

stdin = sys.stdin

ni = lambda: int(ns())
nf = lambda: float(ns())
na = lambda: list(map(int, stdin.readline().split()))
nb = lambda: list(map(float, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

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 = ni()
res = factorization(N)
ans = 0
sum_ = [x for x in range(1, 200)]
for i in range(len(sum_)-1):
    sum_[i+1] += sum_[i]
for k, v in res:
    ans += bisect.bisect_right(sum_, v)
if N == 1:
    print(0)
else:
    print(ans)

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

l = prime_factorize(n)
c = Counter(l)
v = c.values()
ans = 0
for i in v:
    a = 0
    for j in range(1, 1000000):
        a += j
        if a > i:
            ans += j-1
            break
print(ans)

def factrize(num):
    factor = {}
    div = 2
    s = int(num**0.5)+1
    while div < s:
        div_cnt = 0
        while num % div == 0:
            div_cnt += 1
            num //= div
        if div_cnt != 0:
            factor[div] = div_cnt
        div += 1
    if num > 1:
        factor[num] = 1
    return factor
  
n = int(input())
cnt = factrize(n)

ans = 0
for c in cnt.values():
    tmp = 1
    while c >= tmp:
        c -= tmp
        ans += 1
        tmp += 1      
print(ans)

import sys
def input(): return sys.stdin.readline().rstrip()
class Sieve2: #√nまでの素因数で試し割り 前処理O(√nloglogn+√n/logn)
    def __init__(self,n):
        self.primes=[]
        self.f=[0]*(int(n**0.5)+1) #ふるい（素数ならその値）
        self.f[0]=self.f[1]=-1
        for i in range(2,int(n**0.5)+1): #素数リスト作成
            if self.f[i]: continue
            self.primes.append(i)
            self.f[i]=i
            for j in range(i*i,int(n**0.5)+1,i):
                if not self.f[j]:
                    self.f[j]=i  #最小の素因数を代入

    def prime_fact(self,x): #素因数分解 {2:p,3:q,5:r,...}
        fact_dict=dict()
        for p in self.primes:
            if p*p>x:break
            while x%p==0:
                x//=p
                fact_dict[p]=fact_dict.get(p,0)+1
        if x>1:fact_dict[x]=fact_dict.get(x,0)+1
        return fact_dict

def main():
    n = int(input())
    Sieve = Sieve2(n)
    prime_dict = Sieve.prime_fact(n)
    ans = 0
    for fact in prime_dict.values():
        f = fact
        x = 1
        while f > 0:
            if f >= x:
                ans += 1
            f -= x
            x += 1
    print(ans)


def __starting_point():
    main()
__starting_point()

N = int(input())
pri_cnt = {}
n = N
i = 2

while i ** 2 <= N:
  while n % i == 0:
    if i not in pri_cnt:
      pri_cnt[i] = 1
    else:
      pri_cnt[i] += 1
    n = n / i
  if (i == 2):
    i += 1
  else:
    i += 2

if n > 1:
  pri_cnt[int(n)] = 1

ans = 0
for pri, cnt in pri_cnt.items():
  count = 1
  remain = cnt
  while remain >= count:
    ans += 1
    remain -= count
    count += 1
print(ans)

import copy
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)
M=L.copy()
M=list(set(M))

cnt=0
for x in M:
    m=L.count(x)
    for i in range(L.count(x)):
        if m-i-1 >= 0:
            m -= i+1
            cnt += 1

print(cnt)


def prime_factors(n):
    i = 2
    factors = []
    while i**2 <= n:
        if n % i != 0:
            i += 1
        else:
            factors.append(i)
            n = n // i
    if n > 1:
        factors.append(n)
    return factors

def resolve():
    N = int(input())
    import collections
    factors = collections.Counter(prime_factors(N))
    numbers = [0,1,1,2,2,2,3,3,3,3,4,4,4,4,4,5,5,5,5,5,5,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9]
    cnt = 0
    for k, v in list(factors.items()):
        cnt += numbers[v]
    print(cnt)


if '__main__' == __name__:
    resolve()


N = int(input())

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

Primes = Prime_Factorize(N)
cnt = 0
for p in Primes:
    e = 1
    z = p
    while (N%z == 0) and (N >= z):
        N //= z
        e += 1 
        z = p**e
        cnt += 1
    while N%p == 0:
        N //= p
print(cnt)

import math

n = int(input())
d = n
m = {}

for i in range(2, int(math.sqrt(n)) + 1):
    m[i] = 0
    while (d % i == 0):
        d //= i
        m[i]+=1
res = 0
for i in list(m.values()):
    res+=int(math.sqrt(i*2+0.25)-0.5)

if d > 1:
    res += 1
print(res)


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


from collections import Counter

n = int(input())
c = Counter(prime_factorize(n))
cnt = 0
for k, v in list(c.items()):
    if v == 1:
        cnt += 1
    else:
        v0 = 1
        while v-v0 >= 0:
            v -= v0
            cnt += 1
            v0 += 1

print(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())
nf = factorization(n)
ans = 0

if n == 1:
    print(ans)
else:
    for i in nf:
        q = i[1]
        c = 1
        while q > 0:
            ans += 1
            c += 1
            q -= c
    print(ans)

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

if n == 1: # 1
    print((0))
    return

c = collections.Counter(prime_factorize(n))
counts = list(c.values())
ans = 0

for i in counts:
    x = 0
    for j in range(i):
        x += j + 1
        if i >= x:
            ans += 1
        else:
            break

print(ans)


n = int(input())
m = n
primes = {}

for i in range(2, int(n**0.5+2)):
  while m % i == 0:
    m //= i
    if i not in primes:
      primes[i] = 1
    else:
      primes[i] += 1
  if i > m:
    break

if m != 1:
  primes[m] = 1

cnt = 0
num = 0
flag = True

while flag == True:
  num += 1
  flag = False
  for i in primes:
    if 0 < primes[i] <= num*2:
      cnt += 1
      primes[i] = 0
    elif primes[i] > num*2:
      cnt += 1
      flag = True
      primes[i] -= num

print(cnt)

a,n=0,int(input())
for i in range(2,10**6):
  x=j=0
  while n%i<1:n//=i;x+=1
  while x>j:a+=1;j+=1;x-=j
print(a+(n>1))

n = int(input())
ans = 0
for i in range(2,(int(n**0.5))+1):
    x = i
    while n%x==0:
        n = n//x
        x*=i
        ans+=1
    while n%i==0:
        n = n//i
if n!=1:
    ans+=1
print(ans)

from collections import defaultdict

N = int(input())

if N == 1:
    print(0)
    return

p = defaultdict(int)

while N % 2 == 0:
    p[2] += 1
    N //= 2
f = 3
while f * f <= N:
    if N % f == 0:
        p[f] += 1
        N //= f
    else:
        f += 2
if N != 1:
    p[N] += 1

ans = 0

for v in p.values():
    n = 1
    i = 1
    while n <= v:
        ans += 1
        i += 1
        n += i

print(ans)

import math
N = int(input())

def prime_decomposition(x):
  i = 2
  ls = []
  while i * i <= x:
    while x % i == 0:
      x /= i
      ls.append(i)
    i += 1
  if x > 1:
    ls.append(int(x))
  return ls

def counter(n):
  i = 1
  while n > 0.5*(i+1)*(i+2)-1:
    i += 1
  return i

cnt = 0
numbers = prime_decomposition(N)
set_number = set(numbers)

for i in set_number:
  cnt += counter(numbers.count(i))
  
print(cnt)

import math
import sys
##### graph implementation with adjacancy list#####
class Graph:
    def __init__(self,Nodes,is_directed=False):
        self.nodes=Nodes
        self.adj_list={}
        self.is_directed=is_directed
 
        for node in self.nodes:
            self.adj_list[node]=[]
            
    def add_edge(self,u,v):
        self.adj_list[u].append(v)
        if self.is_directed==False:
            self.adj_list[v].append(u)
 
    def print_graph(self):
        for node in self.nodes:
            print((node,"->",self.adj_list[node]))
 
    def degree_node(self,node):
        return len(self.adj_list[node])
 
    def dfsUTIL(self,v,visited,parents=[]):
        #print(v,end=" ")
        visited[v]=True
        for i in self.adj_list[v]:
            if visited[i]==False:
                self.dfsUTIL(i,visited,parents)
                parents.append(i)        
    
    def dfs(self,v):
        visited=[False]*(max(self.adj_list)+1)
        parents=[v]
        self.dfsUTIL(v,visited,parents)
        return len(parents)
        
        
        
#####sorting a dictionary by the values#####
def dict_sort(ans):
    ans=sorted(list(ans.items()),reverse=True,key=lambda kv:(kv[1]))
##### naive method for testing prime or not O(n^.5)#####
def is_prime(n):
    if n==1:
        return 0
    for i in range(2,int(math.sqrt(n))+1):
        if n%i==0:
            return False
    return True
#####swap function#####
def swap(a,b):
    temp=a
    a=b
    b=temp
    return a,b
#####Primes till Nth O(n)#####
def seive_primes(n):
    flag=[0]*(n+10)
    flag[1]=flag[0]=1
    i=2
    while i*i<=n+1:
        if flag[i]==0:
            j=i*i
            while j<=n+1:
                flag[j]=1
                j+=i
        i+=1
    return flag
#####greatest common divisor of two numbers#####
def gcd(a,b):
    if b==0:
        return a
    return gcd(b,a%b)
#####least common multiplyer of two numbers#####
def lcm(a,b):
    return (a*b)//gcd(a,b)
#####function that return all the letters#####
def alphabates():
    return "abcdefghijklmnopqrstuvwxyz"
#####binary search O(logN)#####
def binary_search(ls,n,flag):
    low=0
    hi=n-1
    while(low<=hi):
        mid=(low+hi)//2
        if ls[mid]==flag:
            return mid
        elif ls[mid]>flag:
            hi=mid-1
        else:
            low=mid+1
    return -1
#####quadratic#####
def qdrt(a,b,c):
    chk=b*b-4*a*c
    if chk>=0:
        ans1=(-b+chk**0.5)/(2*a)
        ans2=(-b-chk**0.5)/(2*a)
        return [int(ans1),int(ans2)]
    return -1
#####taking an array/list as input#####
def inp():
    ls=list(map(int,input().split()))
    return ls
#####taking multiple inputs#####
def mult_inp():
    return list(map(int,input().split()))
#####Main function starts from here#####
n=int(input())
d={}
while(n%2==0):
    if 2 in d:
        d[2]+=1
    else:
        d[2]=1
    n/=2
for i in range(3,int(n**0.5)+1,2):
    while(n%i==0):
        if i in d:
            d[i]+=1
        else:
            d[i]=1
        n/=i
n=int(n)
if n>1:
    d[n]=1
n=1
#print(d,n)
ans=0
for i in d:
    c=-2*d[i]
    a=b=1
    ls=qdrt(a,b,c)
    if ls[0]>=0:
        ans+=ls[0]
    elif ls[1]>=0:
        ans+=ls[1]
print(ans)
    

    
    
    
            
    
    


import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
#import numpy as np
from math import sqrt, floor
def main():
    def factorization(n):
        l = []
        t = n
        for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
            if t % i == 0:
                cnt = 0
                while t % i == 0:
                    cnt += 1
                    t = t // i
                l.append([i, cnt])
        if t != 1:
            l.append([t, 1])
        if not l:
            l.append([n, 1])
        return l
    n = int(input())
    if n == 1:
        print((0))
        return
    p = factorization(n)
    r = 0
    for pe in p:
        pe1 = pe[1]
        cnt = 1
        while pe1 >= cnt:
            pe1 -= cnt
            cnt = cnt + 1
            r += 1
    print(r)

def __starting_point():
    main()

__starting_point()

def div(n):
    i = 2
    a = n
    D = {}
    tmp = 1
    while i*i <= n:
        cnt = 0
        while a%i == 0:
            a = a // i
            tmp *= i
            cnt += 1
        if cnt > 0:
            D[i] = cnt
        i += 1
    if tmp != n:
        D[n] = 1
    return D

N = int(input())
D = div(N)
ans = 0
for v in D.values():
    i = 1
    total = 1
    while v >= total+(i+1):
        i += 1
        total += i
    ans += i

print(ans)

import bisect
n=int(input())
if n==1:
    print(0)
    return
def 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
def ra(a):
    ll,l=[],1
    for i in range(len(a)-1):
        if a[i]==a[i+1]:
            l+=1
        else:
            ll.append(l)
            l=1
    ll.append(l)
    return ll
l=ra(factorize(n))
c=[1]
for i in range(2,10**4):
    c.append(i+c[-1])
ans=0
for i in l:
    ans+=bisect.bisect_left(c,i)
    if i in set(c):
        ans+=1
print(ans)

n = int(input())
m = n
primes = {}
 
for i in range(2, int(n**0.5+2)):
  while m % i == 0:
    m //= i
    if i not in primes:
      primes[i] = 1
    else:
      primes[i] += 1
  if i > m:
    break
 
if m != 1:
  primes[m] = 1
 
cnt = 0
num = 0
flag = True
 
while flag == True:
  num += 1
  flag = False
  for i in primes:
    if 0 < primes[i] <= num*2:
      cnt += 1
      primes[i] = 0
    elif primes[i] > num*2:
      cnt += 1
      flag = True
      primes[i] -= num
 
print(cnt)

import math
N=int(input())
ans=0
N_sqrt=int(math.sqrt(N))
primeset=set()
primeset.add(2)
if N==1:
    print((0))
else:
    for i in range(2,N_sqrt+5):
        if N%i==0:
            #print(i)
            ans+=1
            nowdiv=2#この回数割れればansに1足せる
            numofdiv=0
            N//=i
            while(N%i==0):
                numofdiv+=1
                N//=i
                if numofdiv==nowdiv:
                    ans+=1
                    nowdiv+=1
                    numofdiv=0
    if N!=1:
        ans+=1
    print(ans)#Nが素数のときans=1



#!/usr/bin/env python3

#import
import math
#import numpy as np
N = int(input())
#= input()
#= map(int, input().split())
#= list(map(int, input().split()))
#= [input(), input()]
#= [list(map(int, input().split())) for _ in range(N)]
#= [int(input()) for _ in range(N)]
#= {i:[] for i in range(N)}

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

res = factorization(N)

li = [0] * 101
for i in range(1, 101):
    li[i] = li[i - 1] + i

ans = 0
for r in res:
    if r[0] == 1:
        continue
    i = 0
    while li[i] <= r[1]:
        i += 1
    ans += i - 1

print(ans)



memo = [[None for i in range(50)] for j in range(50)]
def opt(n,k): # exponents must be >= k
	if n < k:
		return 0
	else:
		if memo[n][k]==None:
			memo[n][k] = max(1+opt(n-k,k+1),opt(n,k+1))
		return memo[n][k]

def prime_factorize(n):
	pf = {}
	d = 2
	orig_n = n
	while d*d <= orig_n:
		while n%d==0:
			pf[d] = pf.get(d,0)+1
			n //= d
		d += 1

	if n > 1:
		pf[n] = 1
	return pf 

print(sum([opt(e,1) for e in prime_factorize(int(input())).values()]))

n = int(input())
#a, b, c, x, y = map(int, input().split())
#al = list(map(int, input().split()))
#al=[list(input()) for i in range(n)]


def prime_factorize(n):
    n_origin = n+0
    primelist = []
    a = 2
    while a*a <= n_origin:
        if n % a != 0:
            a += 1
            continue
        ex = 0
        while n % a == 0:
            ex += 1
            n = n//a
        primelist.append([a, ex])
        a += 1
    if n != 1:
        primelist.append([n, 1])
    return primelist


def sumf(n):
    return n*(n+1)//2


primes = prime_factorize(n)
ans = 0
for pl in primes:
    a, ex = pl
    i = 0
    while True:
        if sumf(i+1) > ex:
            break
        i += 1
    ans += i
print(ans)


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())
fac = factorization(N)
Answer = 0
for i in range(len(fac)):
    faci = fac[i][1]
    An = 1
    while faci >= An:
        Answer += 1
        faci -= An
        An +=1
if N == 1:
    Answer = 0
print(Answer)

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)
L=set(l)
z=0
for j in L:
  i=1
  while i*(i+1)//2<=l.count(j):
    i+=1
  z+=i-1
print(z)

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 = 0

soinsu_list = factorization(N)
#print(soinsu_list)
for i in range(len(soinsu_list)):
    cnt = 0
    while soinsu_list[i][0] != 1:
        cnt += 1
        soinsu_list[i][1] -= cnt
        if soinsu_list[i][1] < 0:
            cnt -= 1
            break
    ans += cnt
print(ans)


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
cnt=[0]
for i in range(1,9):
    for _ in range(i+1):
        cnt.append(i)
lis=factorization(n)


for a,b in lis:
    ans+=cnt[b]
if n==1:
    print((0))
else:print(ans)


n = int(input())

if n == 1:
    print(0)
    return

def is_prime(n):
    if n <= 1: return False
    for i in range(2, int(n**0.5) + 1):
        if n%i == 0: return False
    return True

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
 
ans = []
cnt = 0
X = make_divisors(n)[1:]
for x in X:
    if is_prime(x):
        ans.append(x)
        n //= x
        cnt += 1
        e = 2
        while x**e < n:
            ans.append(x**e)
            e += 1
    elif x in ans:
        if n%x == 0:
            n //= x
            cnt += 1
print(cnt)

import sys
input = sys.stdin.readline

#l = list(map(int, input().split()))
#import numpy as np
#arr = np.array([int(i) for i in input().split()])
'''
a,b=[],[]
for i in range():
    A, B = map(int, input().split())
    a.append(A)   
    b.append(B)'''

n=int(input())
def soinsuu(n):
    #素因数分解リスト生成,collections.Counter(a)で個数取得
    #1に対しては[]をreturn
    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
from collections import Counter
a=Counter(soinsuu(n))
if n==1:
    print(0)
    return
#print(a)
cnt=0
for i in range(1,1+max(a.values())):
    for item in a.keys():
        #print(i,item)
        if n%(item**i)==0:
            n//=item**i
            #print(n,item)
            cnt+=1
            if n==1:
                break

print(cnt)

import collections
import sys
def input(): return sys.stdin.readline().rstrip()

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())
count = 0
prime_list = collections.Counter(prime_factorize(N))

for key in prime_list:
    num = prime_list[key]
    for i in range(1, num+1):
        if i <= num:
            num -= i
            count += 1
        else:
            break

print(count)

n = int(input())
 
from collections import Counter
 
f = Counter()

factors = []
for i in range(2, min(int(n ** 0.5 + 1), n + 1)):
  if n % i == 0:
      factors.append(i)
      factors.append(n // i)

factors.sort()

for factor in factors:
    while n % factor == 0:
        n //= factor
        f[factor] += 1

 
    
def bsearch(test, lo, hi):
  while lo != hi:
    mid = (lo + hi + 1) // 2
    if test(mid):
      lo = mid
    else:
      hi = mid - 1
  return lo
 
ans = 0
for p, q in list(f.items()):
  ans += bsearch(lambda w: w * (w + 1) // 2 <= q, 0, 10 ** 12)
 
if ans == 0 and n > 1:
    print((1))
else:
    print(ans)


# ==================================================-
# 高速素因数分解
# """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())
soinnsuu=factorization(n)

def get_times(n):
    if n<3:
        return 1
    elif n<6:
        return 2
    elif n<10:
        return 3
    elif n<15:
        return 4
    elif n<21:
        return 5
    elif n<28:
        return 6
    elif n<36:
        return 7
    elif n<45:
        return 8
    else:
        return 9
ans=0
for i in soinnsuu:
    sisuu=i[1]
    ans+=get_times(sisuu)
if n==1:
    print(0)
else:
    print(ans)

n = int(input())
n1 = n
pn = []
cnt = 2
ans = 0
while cnt <= int(n ** 0.5):
    while n1 % cnt == 0:
        n1 = n1 // cnt
        pn.append(cnt)
    cnt += 1
pns = list(set(pn))
ansa = []
for i in pns:
    ansa.append(pn.count(i))
for i in ansa:
    x = 1
    while i > 0:
        i -= x
        if i < 0:
            break
        x += 1
        ans += 1
print(ans + 1 if n1 != 1 else ans)

# import itertools
# import math
# import sys
# sys.setrecursionlimit(500*500)
# import numpy as np

N = int(input())
# S = input()
# n, *a = map(int, open(0))
# N, M = map(int, input().split())
# A = list(map(int, input().split()))
# B = list(map(int, input().split()))
# tree = [[] for _ in range(N + 1)]
# B_C = [list(map(int,input().split())) for _ in range(M)]
# S = input()

# B_C = sorted(B_C, reverse=True, key=lambda x:x[1])
# all_cases = list(itertools.permutations(P))
# a = list(itertools.combinations_with_replacement(range(1, M + 1), N))
# itertools.product((0,1), repeat=n)

# A = np.array(A)
# cum_A = np.cumsum(A)
# cum_A = np.insert(cum_A, 0, 0)

# def dfs(tree, s):
#     for l in tree[s]:
#         if depth[l[0]] == -1:
#             depth[l[0]] = depth[s] + l[1]
#             dfs(tree, l[0])
# dfs(tree, 1)

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
    

l_2d = factorization(N)

cnt = 0
for l in l_2d:
    p = l[0]
    e = l[1]
    if p == 1:
        continue
    for i in range(1, 10 ** 7):
        if e < i:
            break
        cnt += 1
        e -= i
print(cnt)

N = int(input())
M = N
pf = []
K = 2

while K*K <= M:
  while N%K == 0:
    pf.append(K)
    N = N//K
  K += 1
  
if N != 1:
  pf.append(N)

ans = 0

for i in set(pf):
  C = pf.count(i)
  for j in range(20):
    if j*(j+1)//2 <= C < (j+1)*(j+2)//2:
      ans += j
  
print(ans)

N=int(input())

def divisor(x):
    div=[]
    for i in range(1,int(x**(1/2))+1):
        if x%i==0:
            div.append(i)
            if i!=x//i:
                div.append(x//i)
    return sorted(div)

def factorization(n):
    arr=[]
    temp=n
    for i in range(2,int(n**(1/2))+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

zt=[1]
ans=0
while N>1:
    for i in divisor(N):
        if i not in zt:  
            if len(factorization(i))==1:
                z=i
                zt.append(z)
                break
    if z==0:
        break
    N=N//z
    ans+=1
    z=0

print(ans)

#!/usr/bin/env python3
import sys
from itertools import chain
import numpy as np
import math

# from itertools import combinations as comb
# form bisect import bisect_left, bisect_right, insort_left, insort_right
# from collections import Counter
# import numpy as np


def factorize(n: int):
    """nを素因数分解する"""
    # 2
    count = 0
    while n % 2 == 0:
        count += 1
        n = n // 2
    if count > 0:
        arr = [(2, count)]
    else:
        arr = []

    # 3 以降
    for facter in range(3, n + 1, 2):
        if facter * facter > n:
            if n > 1:
                arr.append((n, 1))
            break
        count = 0
        while n % facter == 0:
            count += 1
            n = n // facter
        if count > 0:
            arr.append((facter, count))

    return arr


def case(n):
    t = 0
    i = 1
    while True:
        t += i
        if t > n:
            return i - 1
        i += 1


def solve(N: int):
    factors = factorize(N)
    answer = 0
    for f, count in factors:
        answer += case(count)
    return answer


def main():
    tokens = chain(*(line.split() for line in sys.stdin))
    # N = map(int, line.split())
    N = int(next(tokens))  # type: int
    answer = solve(N)
    print(answer)


def __starting_point():
    main()

__starting_point()

N = int(input())

if N == 1:
  print(0)
  return

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 p_num(m):
  ret = 0
  for j in range(1,10**12):
    ret += j
    if ret <= m < ret+(j+1):
      ans = j
      break
  return ans

p = factorization(N)

cnt = 0
for k in range(len(p)):
  cnt += p_num(p[k][1])
print(cnt)

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

if n == 1: # 1
    print(0)
    return

c = collections.Counter(prime_factorize(n))
_, counts = zip(*c.most_common())

l = list(counts)
ans = 0

for i in l:
    x = 0
    for j in range(i):
        x += j + 1
        if i >= x:
            ans += 1
        else:
            break

print(ans)

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())
c = Counter(prime_factorize(n))
v = list(c.values())

ans = 0
for i in v:
    k = i
    s = 0
    for j in range(1, i+1):
        s += j
        if s <= k:
            ans += 1
        else:
            break
print(ans)

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")
    return

factors = factorization(N)

ans = 0
for factor in factors:
    num = factor[1]
    x = 1
    for i in range(num+1):
        if i**2 + i > 2*num:
            x = i-1
            break
#    print(num,x)                                                                                      
    ans += x

print(ans)


from collections import defaultdict
n = int(input())

d = defaultdict(int)

i = 2
while i * i <= n:
    while n % i == 0:
        d[i] += 1
        n /= i
    i += 1
if n != 1:
    d[n] += 1

ans = 0
for v in list(d.values()):
    # x * (x + 1) // 2 <= vとなる最大のx
    x = 0
    while (x + 1) * (x + 2) // 2 <= v:
        x += 1
    ans += x
print(ans)


import math
import numpy as np
n = int(input())

s = math.sqrt(n)
i = 2
f = {}
while i <= s:
    while n % i == 0:
        f[i] = f.get(i,0)+1
        n = n // i
    i += 1

ans = 0
for x in f.values():
    e = 0
    cumsum = 0
    while e + cumsum + 1 <= x:
        e += 1
        cumsum += e
    ans += e
print(ans+(n>1))

import bisect
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

n = int(input())

sigma = [1]
for i in range(2, 20):
    sigma.append(i+sigma[i-2])
ans = 0
for i, j in factorization(n):
    ans += bisect.bisect_right(sigma, j)

print(ans)

import math
n=int(input())
def fac(n):
    arr=[]
    temp=n
    for i in range(2,math.ceil(math.sqrt(n)+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
l=fac(n)
if n==1:
    print((0))
else:
    ans=0
    for i in range(len(l)):
        count=l[i][1]
        p=0
        k=1
        while count>0:
            if count-k<0:
                break
            p+=1
            count-=k
            k+=1
        ans+=p
    print(ans)




import collections

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

if N <= 1:
  print(0)
  return
else:
  c = collections.Counter(prime_factorize(N))

  K = [sum(range(1,i)) for i in range(2,11)]
  # = [1, 3, 6, 10, 15, 21, 28, 36, 45]
 
  for i in c:
    for j in range(1,len(K)):
      if c[i] < K[j]:
        count += j
        break

  print(count)

from collections import defaultdict

N = int(input())

def factorize(N):
    factors = defaultdict(int)
    i = 2
    while i * i <= N:
        factor = 0
        while N % i == 0:
            N //= i
            factor += 1
        if factor > 0:
            factors[i] = factor
        i += 1
    if N > 1:
        factors[N] = 1
    return factors

def to_cnt(n):
    i = 0
    while n >= i+1:
        n-=(i+1)
        i += 1
    return i

ans = 0
for _, n in factorize(N).items():
    ans += to_cnt(n)
print(ans)

def find_primes(n):
    ps = []
    t = [True] * n
    t[0] = t[1] = False
    for i in range(2, n):
        if not t[i]:
            continue
        ps.append(i)
        for j in range(i, n, i):
            t[j] = False
    return ps


def solve(string):
    n = int(string)
    if n == 1:
        return "0"
    rn = int(n**0.5 + 1)
    ps = find_primes(rn)
    ans = 0
    for i in ps:
        k = 1
        while n % (i**k) == 0:
            ans += 1
            n //= i**k
            k += 1
    return str(ans + (n >= rn))


def __starting_point():
    import sys
    print((solve(sys.stdin.read().strip())))

__starting_point()

import sys
N = int(input())
if N == 1:
    print(0)
    return
def prime2(N):
    arr = []
    temp = N
    setprime = set()
    for i in range(2, int(-(-N**0.5//1))+1):
        if temp%i==0:
            cnt=0
            setprime.add(i)
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])
        setprime.add(temp)

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

    return arr,setprime

arr,_ = prime2(N)
ls = []
ans = 0
for i in arr:
    ls.append(i[1])
for j in ls:
    k = 1
    ii = 0
    while j >= k:
        j -= k
        k += 1
        ii += 1
    ans += ii
print(ans)

import math
n = int(input())

#Prime factoring
pf = []
for i in range(2,math.ceil(n**0.5)+1):
    temp = 0
    while n%i==0:
        n /= i
        temp += 1
    if temp:
        pf.append(temp)
    if n==1:
        break
if n!=1:
    pf.append(1)

ans =  0
for i in range(len(pf)):
    j = 1
    while pf[i]-j>=0:
        ans += 1
        pf[i] -= j
        j += 1
print(ans)

from collections import defaultdict
from math import sqrt

def main():
    n = int(input())
    wi = 2
    cnt = 0
    d = defaultdict(lambda:0)
    fi = int(sqrt(1e12)+1)
    for i in range(2, fi):
        while n % i == 0:
            d[i] += 1
            n //= i
    if n != 1:
        d[n] = 1

    for val in d.values():
        x = val
        wi = 1
        while(x >= wi):
            x -= wi
            wi += 1
            cnt += 1
    print(cnt)


def __starting_point():
    main()
__starting_point()

#!/usr/bin/env python3


def main():
    from collections import deque

    def prime_factorization_list(n: int):
        """
        入力された整数nを素因数分解し，素因数が列挙されたリストで返却
        Parameters
        ----------
        n : int
            素因数分解したい整数
        Returns
        -------
        prime_factorization_lst : lst
            [素因数]の形で素因数が列挙された素因数分解結果
        """
        fct = []  # prime factor
        b = 2     # base factor
        while b * b <= n:
            while n % b == 0:
                n //= b
                fct.append(b)
            b += 1
        if n > 1:
            fct.append(n)
        return fct

    N = int(input())

    q = deque(prime_factorization_list(N))
    memo = []
    while q:
        p = q.popleft()
        res = p
        while res in memo and q:
            can = q.popleft()
            if can == p:
                res *= can
            else:
                res = can
                break
        if res not in memo:
            memo.append(res)
    print((len(memo)))


def __starting_point():
    main()

__starting_point()

from collections import Counter


def factor(n):
    res = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            res.append(i)
            n //= i
    if n > 1:
        return res + [n]
    else:
        return res


N = int(input())
ps = factor(N)
sq = [i * (i + 1) // 2 for i in range(100)]
ans = 0
for k, v in list(Counter(ps).items()):
    for i in range(99):
        if sq[i] <= v < sq[i + 1]:
            ans += i
            break
print(ans)


import math
 
N = int(input())
 
M = int(math.sqrt(N))

ans = 0 
check = [True for _ in range(M + 1)]
e = [0 for _ in range(M + 1)]

for p in range(2, M + 1):
    if check[p] == True:
        for j in range(2, M // p + 1):
            check[p * j] = False

        while N % p == 0:
            N = N // p
            e[p] += 1
        
        ans += int((math.sqrt(1 + 8 * e[p]) - 1)/2)

if N > 1:
    ans += 1

print(ans)

N=int(input())
import math

if N==1:
    print(0)
    return
    
def soinsu(m):
    arr=[]
    temp=m
    for i in range(2,int(math.sqrt(m)+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([m,1])
    
    return arr

arr=soinsu(N)
ans=0
for i in range(len(arr)):
    s=1
    con=arr[i][1]
    while con>=s:
        ans+=1
        con-= s
        s +=1
print(ans)

from collections import Counter

def factor(n):
    p = []
    if n == 1:
        return p
    m = n
    i = 2
    while i * i <= n:
        while m % i == 0:
            m //= i
            p.append(i)
        i += 1
    if m > 1:
        p.append(m)
    return p

n = int(input())
p = Counter(factor(n))
ans = 0
for x in p.values():
    i = 1
    while x - i >= 0:
        x -= i
        i += 1
        ans += 1
print(ans)

#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate, product # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
import math

#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入g
#
# インデックス系
# int min_y = max(0, i - 2), max_y = min(h - 1, i + 2);
# int min_x = max(0, j - 2), max_x = min(w - 1, j + 2);
#
#
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
#mod = 998244353
from sys import stdin
readline = stdin.readline
def readInts():
  return list(map(int,readline().split()))
def readTuples():
    return tuple(map(int,readline().split()))
def I():
  return int(readline())
n = I()
def soinsu(n):
    dic = defaultdict(int)
    i = 2
    while i*i <= n:
        if n%i == 0:
            dic[i] += 1
            n //= i
        else:
            i += 1
    if n!= 1:
        dic[n] += 1
    return dic
dic = soinsu(n)
ans = 0
for k,v in list(dic.items()):
    i = 1
    while True:
        if v >= i:
            ans += 1
            v -= i
            i += 1
        else:
            break
print(ans)


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

q = factorization(n)

ans = 0
for i in range(len(q)):
    l = q[i][1]
    if q[i][0] == 1:
        continue

    for j in range(1,l+1):
        l -= j
        if l < 0:
            break
        else:
            ans += 1
print(ans)


a,n=0,int(input())
for i in range(2,int(n**0.5+1)):
  x=0
  while(n%i==0):n//=i;x+=1
  j=1
  while(x>=j):a+=1;x-=j;j+=1
print(a+(n>1))

N = int(input())
div = 2
dic = {}
while div**2 <= N:
  if N % div == 0:
    count = 0
    while N % div == 0:
      N = N // div
      count += 1
    dic[div] = count
  div += 1
if N != 1:
  dic[N] = 1
ans = 0
for v in dic.values():
  tmp = 1
  while v >= tmp:
    v -= tmp
    tmp += 1
    ans += 1
print(ans)

from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

#素因数分解
def prime_factorize(n):
    if n == 1:
        return [1]
    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 = inp()
c = Counter(prime_factorize(n))
res = 0
# print(c)
for k,v in c.items():
    if k == 1: continue
    cnt = 0
    for now in range(1,150000):
        cnt += now
        if cnt > v:
            res += now-1
            break
print(res)

N = int(input())
D = {}

for k in range(2,10**6):
  while N%k<1:
    N//=k
    D[k]=D.get(k,0)+1

a = 0
for i in D.values():
  t = 0
  c = 0
  while t+c<i:
    c+=1
    t+=c
  a+=c
print(a+(N>1))

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())
L=factorization(N)

a=0
for p,e in L:
    if p==1:continue
    t=1
    while t<=e:
        # print(p,e,a)
        a+=1
        e-=t
        t+=1
print(a)

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 abc169d_div_game():
    n = int(input())
    arr = factorization(n)
    cnt = 0
    for p, e in arr:
        if p == 1: continue
        for i in range(1, e+1):
            if e >= i:
                cnt += 1
                e -= i
            else:
                break
    print(cnt)

abc169d_div_game()

'''
Created on 2020/08/23

@author: harurun
'''
def f(n):
  arr=[]
  temp=n
  for c in range(2,int(-(-n**0.5//1))+1):
    if temp%c==0:
      cnt=0
      while temp%c==0:
        cnt+=1
        temp//=c
      arr.append([c,cnt])
  if temp!=1:
    arr.append([temp,1])
  return arr

def main():
  import math
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write

  N=int(pin())
  r=f(N)
  ans=0
  for i in r:
    ans+=int((math.sqrt(1+8*i[1])-1)/2)
  print(ans)
  return 
main()

import sys
from collections import deque, defaultdict, Counter
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush
from math import ceil, floor, sqrt, gcd, inf
from copy import deepcopy
import numpy as np
import scipy as sp

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

INF = inf
MOD = 1000000007

n = int(input())

tmp = 0
res = 0

cnt = Counter(prime_factorize(n))
for i in list(cnt.values()):
    res += floor((-1 + sqrt(1 + 8 * i)) / 2)

print(res)


N = int(input())

d = 2

ans = 0

while d*d <= N:
    if N % d != 0:
        d += 1
        continue
        # Nがdで割り切れないとき，何もせずdを一歩進める。例えば d = 4 のときは，それ以前に d = 2 の時でNを割り切ってしまっているので，N % 4 != 0 と出る。

    z = d

    while N % z == 0:
         N //= z
         z *= d

         ans += 1

    while N % d == 0:
        N //= d

if N != 1:
    ans += 1

print(ans)

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())
np = set(prime_factorize(n))
npl = []
for i in np:
    j = 1
    j *= i
    while j <= n:
        npl.append(j)
        j *= i
npl.sort()

cz = 2
ans = 0
for cz in npl:
    # print(n, cz)
    if cz > n:
        break
    if n % cz == 0:
        ans += 1
        n //= cz
print(ans)

n = int(input())
ans = 0
for i in range(2,(int(n**0.5))+1):
    x = i
    while n%x==0:
        n = n//x
        x*=i
        ans+=1
    while n%i==0:
        n = n//i
if n!=1:
    ans+=1
print(ans)

N = int(input())
res = {}
ans = 0
i = 2
 
for i in range(2,int(N**(1/2))+1) :
    while(N%i == 0) :
        if(i not in res) :
            res[i] = 1
        else :
            res[i] += 1
        N /= i
if(N != 1) :
    res[N] = 1
 

for i in res :
    b = 1
    s = res[i]
    while(b <= s) :
        ans += 1
        s -= b
        b += 1
print(ans)


import bisect

N=int(input())
ans=0
i=2
a=[j*(j+1)//2 for j in range(64)]
while i*i<=N:
    cnt=0
    while N%i==0:
        N//=i
        cnt+=1
    ans+=bisect.bisect_right(a,cnt)-1
    i+=1
if N>1:
    ans+=1
print(ans)


import collections
import bisect
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))
sums = []
s=1
ans = 0
for v in c.values():
  count = 0
  for i in range(1,v+1):
    if count+i > v:
      break
    else:
      count += i
      ans += 1
print(ans)

import math

def solve():
    N = int(input())
    ans = 0
    for i in range(2, int(math.sqrt(N)) + 2):
        n = 1
        cnt = 0
        while N % i == 0:
            N //= i
            cnt += 1
            if cnt == n:
                cnt = 0
                n += 1
                ans += 1
    if N != 1:
        ans += 1
    return ans

print((solve()))


N=int(input())

if N==1:
  print('0')
  return

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 divcount(n):
  cnt=0
  while n>=0:
    n-=cnt+1
    cnt+=1
  return cnt-1

s=factorization(N)
t=[i[1] for i in s]
ans=0
for i in t:
  ans+=divcount(i)
print(ans)

N=int(input());P=[];Q=[];a=0
for i in range(2,10**3):
 if all(i%p for p in P):P.append(i)
for i in range(3,10**6):
 if all(i%p for p in P):Q.append(i)
for p in P+Q:
 i=0
 while N%p<1:N//=p;i+=1
 a+=int((2*i+.25)**.5-.5)
print(a+(N>1))

N = int(input())
if N == 1:
    print(0)
    return
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 = 0
l = factorization(N)
for i,j in l:
    k = 1
    while j >= k:
        ans += 1
        j -= k
        k += 1
print(ans)

N = int(input())

ans = 0
for i in range(2, N):
    if i * i > N:
        break
    e = 0
    while N % i == 0:
        e += 1
        N //= i
    if e > 0:
        for j in range(1, 10):
            if e >= j:
                e -= j
                ans += 1
            else:
                break
if N > 1:
    ans += 1

print(ans)


import math
import collections
def prime_diviation(n):
    factors = []
    i = 2
    while i <= math.floor(math.sqrt(n)):
        if n%i == 0:
            factors.append(int(i))
            n //= i
        else:
            i += 1
    if n > 1:
        factors.append(n)
    return factors

N = int(input())
if N == 1:
  print(0)
  return
#pr:素因数分解 prs:集合にしたやつ prcnt:counter
pr = prime_diviation(N)
prs = set(pr)
prcnt = collections.Counter(pr)
#print(pr, prs, prcnt)
ans = 0

for a in prs:
  i = 1
  cnt = 2*prcnt[a]
  #2*prcnt >= n(n+1)となる最大のnを探すのが楽そう
#  print(cnt)
  while cnt >= i*(i+1):
    i += 1
  ans += i - 1 
  
print(ans)  

import collections
N = int(input())
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
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
use_list = []
cnt = 0
while True:
    flag = 0
    div_list = make_divisors(N)
    if len(div_list) == 1:
        break
    for i in range(1,len(div_list)):
        if (len(collections.Counter(prime_factorize(div_list[i]))) == 1) and (div_list[i] not in use_list):
            use_list.append(div_list[i])
            N = N //div_list[i]
            cnt +=1
            flag = 1
            break
    if flag == 0:
        break
print(cnt)

def prime_factorize(n):
    '''
    素因数分解のリストを返す。n == 1のとき[]になるので注意。
    :param n:int
    素因数分解する自然数
    :return: list
    素因数分解した結果。

    例
    n : 10
    primes : [[2, 1], [5, 1]]
    '''
    primes = []
    for i in range(2, int(n ** (1 / 2)) + 1):
        if n % i != 0:
            continue
        num = 0
        while n % i == 0:
            num += 1
            n //= i
        primes.append([i, num])
    if n != 1:
        primes.append([n, 1])
    return primes

N = int(input())
prime_list = prime_factorize(N)
ans = 0
for _, e in prime_list:
    now = 1
    work = e
    while work >= now:
        work -= now
        now += 1
        ans += 1
print(ans)

def prime_decomposition(n):
    
    i = 2
    table = []
    while i * i <= n:
        if n % i == 0:
            cnt = 0
            while n % i == 0:
                n //= i
                cnt += 1
            table.append((i, cnt))
        i += 1
    if n > 1:
        table.append((n, 1))
    return table

from itertools import groupby
from collections import Counter
import sys
input = sys.stdin.readline

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

    ans = 0
    table = prime_decomposition(N)
    for _, cnt in table:
        i = 1
        while cnt >= i:
            cnt -= i
            i += 1
            ans += 1

    print(ans)

main()

N=int(input())
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=temp//i
        # arr.append([i,cnt])
        arr.append(cnt)
if temp!=1:
    # arr.append([temp,1])
    arr.append(1)
if arr==[] and N!=1:
    # arr.append([N,1])
    arr.append(1)
# print(arr)
ans=0
for i in range(len(arr)):
    for n in range(1,100):
        if arr[i]>=n:
            ans+=1
            arr[i]-=n
        else:
            break
print(ans)

import math

def main():
	N = int(input())
	f = prime_factorize(N)
	cnt = 0
	if N == 1:
		print(cnt)
		return 0

	for p in f:
		prime = p[0]
		power = p[1]
		tmp = math.floor((math.sqrt(1 + 8 * power) - 1) / 2)
		cnt += tmp
	print(cnt)


def prime_factorize(n):
	ret = []
	for i in range(2, int(n ** 0.5) + 1):
		if n % i == 0:
			cnt = 0
			while n % i == 0:
				cnt += 1
				n = n // i
			ret.append([i, cnt])
	if n != 1:
		ret.append([n, 1])
	if len(ret) == 0:
		ret.append([n, 1])

	return ret

main()

from collections import Counter
from itertools import accumulate
from bisect import bisect_right


def factor(n):
    res = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            res.append(i)
            n //= i
    if n > 1:
        return res + [n]
    else:
        return res


num = [i for i in range(1, 65)]
num = list(accumulate(num))

N = int(input())
primes = Counter(factor(N))
ans = 0
for v in list(primes.values()):
    ans += bisect_right(num, v)
print(ans)


import math
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

f=factorization(n) 
l=len(f)
x=0
for i in range(l):
    x+=int((-1+math.sqrt(1+8*f[i][1]))//2)
if n==1:
    x=0
print(x)


import math

def prime(num):
	array=[]
	tmp=int(math.sqrt(n))+1
	for i in range(2,tmp):
		while num % i == 0:
			num/=i
			array.append(i)
	# リストが空なら入力(num)は素数
	
	if array==[]:
		return [num]
	else:
		if num>1:
			array.append(int(num))
		return array

n=int(input())
P=prime(n)
P=sorted(P)
num=n
if 1 in P:
	print(0)
else:
	ans=0
	tmp=0
	for i in range(0,len(P)):
		if i==0:
			tmp=P[i] 
		elif P[i]==P[i-1]:
			tmp*=P[i]
		else:
			tmp=P[i]
			num=n
		if num%tmp==0:
			num/=tmp
			ans+=1
			
	print(ans)

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

if n == 1: # 1
    print((0))
    return

c = collections.Counter(prime_factorize(n))
_, counts = list(zip(*c.most_common()))

l = list(counts)
ans = 0

if l == [1]: # prime number
    print((1))
    return

for i in l:
    for j in range(1, i+1):
        if i >= j:
            i -= j
            ans += 1

print(ans)