CodeEff/ECCO huggingface dataset:
# Original solution
n=int(eval(input()))

def primes_factraizar(n):
    rn = int(n**0.5)
    is_prime = [True] * (rn+1) #まずは[1]*n^0.5を用意
    is_prime[0] = False 
    is_prime[1] = False
    for i in range(2, rn + 1): #素数の判定√nまでで十分
        if not is_prime[i]: #非素数は無視
            continue            #continue分はループ中の後続の命令をスキップする
        for j in range(i * 2, rn + 1, i): #i*2~nまでのiの倍数を順番に消す
            is_prime[j] = False
    return [i for i in range(rn + 1) if is_prime[i]]
primes = primes_factraizar(n)

if n==0 or n==1:
    print((0))
    exit()



div = []
for i in primes:
    for j in range(1000):
        if n%i==0:
            n=n//i
        else:
            if j == 0:
                break
            div.append(j)
            break
if n != 1:
    div.append(1) 

if div == []:
    print((1))
    exit()
ans = 0
for i in div:
    c = 0
    for j in range(1,10**9):
        if i >= c+j:
            c+=j
        else:
            ans += j-1
            break
print(ans)


# Optimized solution
n = int(eval(input()))
if n == 1:
    print((0))
    exit()

def primes_factraizar(n):
    rn = int(n**0.5)
    is_prime = [True]*(rn+1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2,rn+1):
        if not is_prime[i]:
            continue
        for j in range(i*2,rn+1,i):
            is_prime[j] = False
        return [i for i in range(rn+1) if is_prime[i]]
primes = primes_factraizar(n)

divisors = []
for i in primes:
    if n % i == 0:
        divisors.append(i)

divisors.sort()

if divisors == []:
    print((1))
    exit()
ans = 0

for i in divisors:
    if i == 1:
        continue

    c = 0

    while n%i == 0:
        n = n // i
        c += 1
    
    d=0

    for count in range(1,1000):
        if c >= d+count:
            ans += 1
            d+=count
        else:
            break
if not n == 1:
    ans += 1

print(ans)
# Original solution
import math

# 素数リスト生成　eratosthenes
def makePrime(m):
    p = [i for i in range(m + 1)]
    for i in p[3:]:
        if p[i] % 2 == 0: p[i] = 0

    root_m = m ** 0.5
    for i in range(3,m):
        if i > root_m: break
        if p[i] != 0:
            for j in range(i, m + 1, 2):
                if i * j >= m + 1: break
                p[i * j] = 0
    #return p
    return sorted(list(set(p)))[2:]


# 素数かどうか判定
def isPrime(x):
    if x <= 1:
        return False
    
    for i in range(2,math.floor(math.sqrt(x))+1):
        if (x % i) == 0:
            return False
    return True

# zの値を作成
def z_make(n,p):
    for prime in p:
        for i in range(1,100000000000):
            z = prime ** i
            
            if z >= n:
                break
            
            if not z in memo:
                memo.append(z)

def divGame2(n):
    for z in memo:
        global ans
        if n % z == 0:
            rem = n / z
            memo.remove(z)
            ans += 1
            #print("n=",n," z=",z,"rem=",rem," ans=",ans)
            return divGame2(rem)
        

memo = []  # memory
ans = 0    # answer
p = []     # Prime

n = int(eval(input()))
p = makePrime(100000)

if isPrime(n): # 素数だったら１が答え
    print((1))
else:
    z_make(n,p)  # zの値を生成。memoができる
    memo.sort()  # 念のため並び替え
    #print(memo)
    divGame2(n)  # メイン実行
    print(ans)   # 答えの出力


# Optimized solution
n = int(eval(input()))

i = 2
memo = []
while( i*i <= n ):
    x = 0
    while(n % i == 0):
        #print("n % i == 0 =",n,i,"n/i=",n/i,x+1)
        n = int(n / i);
        x = x + 1
    memo.append([i,x])
    i = i + 1

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

ans = 0
for i in memo:
    x = i[1]
    b = 1
    while b <= x:
        x = x - b
        b = b + 1
        ans = ans + 1

print(ans)
# Original solution
def func(N):
    tmp=N
    arr=[]
    for i in range(2,int((N**0.5//1))+1):
        if tmp%i==0:
            cnt=0
            while tmp%i==0:
                cnt+=1
                tmp//=i
            arr.append([i,cnt])
            
    if tmp!=1:
        arr.append([tmp, 1])
    if arr==[]:
        arr.append([tmp,1])
   
    return arr

N=int(eval(input()))
a=func(N)
ans=0
if a[0][0]==1:
        print((0))
        exit()
        
b=[1,3,6,10,15,21,28,36,45]
for i in a:
    for j in range(len(b)):
       if  i[1]<b[j]:
          ans+=j
          break
print(ans)
    
            

# Optimized solution
def func(N):
    tmp=N
    arr=[]
    for i in range(2,int((N**0.5//1))+1):
        if tmp%i==0:
            cnt=0
            while tmp%i==0:
                cnt+=1
                tmp//=i
            arr.append([i,cnt])
            
    if tmp!=1 or arr==[]:
        arr.append([tmp, 1])
    return arr

N=int(eval(input()))
a=func(N)
ans=0
if a[0][0]==1:
        print((0))
        exit()
        
b=[1,3,6,10,15,21,28,36,45]
for i in a:
    for j in range(len(b)):
       if  i[1]<b[j]:
          ans+=j
          break
print(ans)
# Original solution
from math import sqrt

N = int(eval(input()))

rn = int(sqrt(N))
sieve = [0] * (rn + 1)
sieve[0] = -1
sieve[1] = -1
t = [0] * (rn + 1)
for i in range(2, rn + 1):
    if sieve[i] != 0:
        continue
    sieve[i] = i
    j = i
    while j < rn + 1:
        t[j] = 1
        j *= i
    for j in range(i * i, rn + 1, i):
        if sieve[j] == 0:
            sieve[j] = i

result = 0
last = -1
for i in range(2, rn + 1):
    if t[i] == 0:
        continue
    if N % i == 0:
        result += 1
        N //= i
        last = i
if N != 1 and N > rn:
    result += 1
print(result)


# Optimized solution
from math import sqrt


def prime_factorize(n):
    result = []
    for i in range(2, int(sqrt(n)) + 1):
        if n % i != 0:
            continue
        t = 0
        while n % i == 0:
            n //= i
            t += 1
        result.append((i, t))
        if n == 1:
            break
    if n != 1:
        result.append((n, 1))
    return result


N = int(eval(input()))

result = 0
for p, e in prime_factorize(N):
    i = 1
    while e >= i:
        result += 1
        e -= i
        i += 1
print(result)
# Original solution
from math import sqrt


def prime_factorize(n):
    result = []
    for i in range(2, int(sqrt(n)) + 1):
        if n % i != 0:
            continue
        t = 0
        while n % i == 0:
            n //= i
            t += 1
        result.append((i, t))
        if n == 1:
            break
    if n != 1:
        result.append((n, 1))
    return result


N = int(eval(input()))

result = 0
for p, e in prime_factorize(N):
    i = 1
    while e >= i:
        result += 1
        e -= i
        i += 1
print(result)


# Optimized solution
from math import sqrt


def prime_factorize(n):
    result = []
    if n % 2 == 0:
        t = 0
        while n % 2 == 0:
            n //= 2
            t += 1
        result.append((2, t))
    for i in range(3, int(sqrt(n)) + 1, 2):
        if n % i != 0:
            continue
        t = 0
        while n % i == 0:
            n //= i
            t += 1
        result.append((i, t))
        if n == 1:
            break
    if n != 1:
        result.append((n, 1))
    return result


N = int(eval(input()))

result = 0
for p, e in prime_factorize(N):
    i = 1
    while e >= i:
        result += 1
        e -= i
        i += 1
print(result)
# Original solution
from math import sqrt


def prime_factorize(n):
    result = []
    if n % 2 == 0:
        t = 0
        while n % 2 == 0:
            n //= 2
            t += 1
        result.append((2, t))
    for i in range(3, int(sqrt(n)) + 1, 2):
        if n % i != 0:
            continue
        t = 0
        while n % i == 0:
            n //= i
            t += 1
        result.append((i, t))
        if n == 1:
            break
    if n != 1:
        result.append((n, 1))
    return result


N = int(eval(input()))

result = 0
for p, e in prime_factorize(N):
    i = 1
    while e >= i:
        result += 1
        e -= i
        i += 1
print(result)


# Optimized solution
def prime_factorize(n):
    result = []
    if n % 2 == 0:
        t = 0
        while n % 2 == 0:
            n //= 2
            t += 1
        result.append((2, t))
    for i in range(3, int(n ** 0.5) + 1, 2):
        if n % i != 0:
            continue
        t = 0
        while n % i == 0:
            n //= i
            t += 1
        result.append((i, t))
        if n == 1:
            break
    if n != 1:
        result.append((n, 1))
    return result


N = int(eval(input()))

result = 0
for p, e in prime_factorize(N):
    i = 1
    while e >= i:
        result += 1
        e -= i
        i += 1
print(result)
# Original solution
import math
import random

def is_prime3(q,k=50):
    q = abs(q)
    #計算するまでもなく判定できるものははじく
    if q == 2: return True
    if q < 2 or q&1 == 0: return False

    #n-1=2^s*dとし（但しaは整数、dは奇数)、dを求める
    d = (q-1)>>1
    while d&1 == 0:
        d >>= 1

    #判定をk回繰り返す
    for i in range(k):
        a = random.randint(1,q-1)
        t = d
        y = pow(a,t,q)
        #[0,s-1]の範囲すべてをチェック
        while t != q-1 and y != 1 and y != q-1:
            y = pow(y,2,q)
            t <<= 1
        if y != q-1 and t&1 == 0:
            return False
    return True

def get_prime(number):
    prime_list = []
    search_list = list(range(2,number + 1))
    while search_list[0] <= math.sqrt(number):
        head_num = search_list.pop(0)
        prime_list.append(head_num)
        search_list = [num for num in search_list if num % head_num != 0]
    prime_list.extend(search_list)
    return prime_list

l = get_prime(10**6+10)
N = int(eval(input()))
ans = 0
k = 1
i = 0
l2 = []
while(l[i]**2 <= N):
    if N % (l[i]**k) == 0:
        N //= (l[i]**k)
        l2.append(l[i]**k)
        k += 1
        ans += 1
    else:
        i += 1
        k = 1
index = 0
while(index < len(l2)):
    if N % (l2[index]) == 0:
        N //= l2[index]
    else:
        index += 1
if is_prime3(N) and N not in l2:
    ans += 1
print(ans)


# Optimized solution
import math
def factrization_prime(number):
    factor = {}
    div = 2
    s = math.sqrt(number)
    while div < s:
        div_cnt = 0
        while number % div == 0:
            div_cnt += 1
            number //= div
        if div_cnt != 0:
            factor[div] = div_cnt
        div += 1
    if number > 1:
        factor[number] = 1
    return factor

N = int(eval(input()))
v = list(factrization_prime(N).values())
ans = 0
for i in range(len(v)):
    k = 1
    while(True):
        if v[i] >= k:
            v[i] -= k
            k += 1
            ans += 1
        else:
            break
print(ans)
# Original solution
x = int(eval(input()))
import math
from collections import defaultdict


def isprime(n):
    if n <= 1:
        return 0
    m = int(math.sqrt(n)) + 1
    for i in range(2, m):
        if n % i == 0:
            return 0
    return 1


if isprime(x):
    print((1))
else:
    res = 0
    value = defaultdict(int)


    def bprime(n):
        cnt = 2
        while n != 1:
            while n % cnt == 0:
                n //= cnt
                value[cnt] += 1
            cnt += 1
    def cal(n):
        j = 1
        cnt = 0
        while n >= j:
            n -= j
            j += 1
            cnt += 1
        return cnt
    bprime(x)
    for key in list(value.keys()):
        res += cal(value[key])
    print(res)

# Optimized solution
x = int(eval(input()))
import math
from collections import defaultdict

res = 0
value = defaultdict(int)
def isprime(n):
    if n <= 1:
        return 0
    m = int(math.sqrt(n)) + 1
    for i in range(2, m):
        if n % i == 0:
            return 0
    return 1
if isprime(x):
    print((1))
else:
    def bprime(n):
        cnt = 2
        m = int(math.sqrt(n)) + 1
        while n != 1 and cnt < m:
            while n % cnt == 0:
                n //= cnt
                value[cnt] += 1
            cnt += 1
        if cnt == m and n != 1:
            value[n] += 1
    def cal(n):
        if n <= 2:
            return 1
        j = 1
        cnt = 0
        while n >= j:
            n -= j
            j += 1
            cnt += 1
        return cnt
    bprime(x)
    for key in list(value.keys()):
        res += cal(value[key])
    print(res)
# Original solution
import math
def sosu(n):
    sosu=1
    if n==1:
        sosu=0
    sq=int(math.sqrt(n))
    for x in range(2,sq+2):
        if n%x==0 and x<n:
            sosu=0
            break
    return sosu  #素数なら1、そうでなければ0
n=int(eval(input()))
so=[]
count=0
if n==1:
    count=0
elif sosu(n)==1:
        count=1
else:
    for x in range(2,int(n/2)+2):
        if x>n:
            break
        hantei=sosu(x)
        shisu=1
        if hantei==1:
            while n%(x**shisu)==0:
                count+=1
                shisu+=1
                n=n/(x**(shisu-1))
print(count)

# Optimized solution
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(eval(input()))
if n==1:
    ans=0
else:
    a=prime_factorize(n)
    if a==[]:
        ans=1
    else:
        ans=0
        xzen=a[0]
        count=1
        ans+=1
        for x in range(1,len(a)):
            if xzen==a[x]:
                count+=1
                if count==3 or count==6 or count==10 or count==15 or count==21 or count==28 or count==36:
                    ans+=1
            else:
                xzen=a[x]
                count=1
                ans+=1
print(ans)
# Original solution
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def prime_factorization(n):
    res = []
    for i in range(2, int(pow(n, 0.5)) + 1):
        if n % i == 0:
            ex = 0
            while n % i == 0:
                ex += 1
                n //= i
            res.append([i, ex])
    if n != 1:
        res.append([n, 1])

    return res


def resolve():
    n = int(eval(input()))
    L = prime_factorization(n)
    res = 0
    for v, ex in L:
        i = 1
        while ex >= 0:
            if ex - i < 0:
                break
            ex -= i
            res += 1
            i += 1

    print(res)


if __name__ == '__main__':
    resolve()


# Optimized solution
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def prime_factorization(n):
    res = []
    for i in range(2, int(pow(n, 0.5)) + 1):
        if n % i == 0:
            ex = 0
            while n % i == 0:
                ex += 1
                n //= i
            res.append(ex)
    if n != 1:
        res.append(1)
    return res


def resolve():
    n = int(eval(input()))
    div = prime_factorization(n)

    res = 0
    for ex in div:
        i = 1
        while ex > 0:
            ex -= i
            if ex < 0:
                break
            i += 1
            res += 1
    print(res)


if __name__ == '__main__':
    resolve()
# Original solution
n = int(eval(input()))
if n == 1:
    print((0))
    exit()

from collections import Counter
def factorize(n):
    d = Counter()
    m = 2
    while m*m <= n:
        while n%m == 0:
            n //= m
            d[m] += 1
        m += 1
    if n > 1:
        d[n] += 1
    return d
 
fac = factorize(n)
ans = 0
for v in list(fac.values()):
    n = 1
    while v >= n:
        v -= n
        ans += 1
        n += 1
print(ans)


# Optimized solution
n = int(eval(input()))
if n == 1:
    print((0))
    exit()

from collections import Counter
def factorize(n):    
    d = Counter()
    if n < 2:
        return d
    
    while n%2 == 0:
        n //= 2
        d[2] += 1

    m = 3
    while m*m <= n:
        while n%m == 0:
            n //= m
            d[m] += 1
        m += 2
    if n > 1:
        d[n] += 1
    return d
 
fac = factorize(n)
ans = 0
for v in list(fac.values()):
    n = 1
    while v >= n:
        v -= n
        ans += 1
        n += 1
print(ans)
# Original solution
from collections import defaultdict
from itertools import accumulate


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

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


# Optimized solution
from collections import defaultdict
from itertools import accumulate


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

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

    ans = 0
    for c in list(prime_counter.values()):
        for accum_index, x in enumerate(acc):
            if c < x:
                break
        ans += accum_index
    print(ans)


if __name__ == '__main__':
    main()
# Original solution
def main():
    n = int(eval(input()))
    ans = 0

    fac = 2
    e = 1
    while True:
        div = pow(fac, e)
        if n % div == 0:
            n //= div
            ans += 1
            e += 1
        else:
            while n % fac == 0:
                n //= fac
            fac += 1
            if fac * fac > n:
                break
            e = 1
    if n != 1:
        ans += 1

    print(ans)


if __name__ == '__main__':
    main()


# Optimized solution
def main():
    n = int(eval(input()))
    ans = 0

    fac = 2
    e = 1
    while True:
        div = pow(fac, e)
        if n % div == 0:
            n //= div
            ans += 1
            e += 1
        else:
            while n % fac == 0:
                n //= fac
            if fac == 2:
                fac += 1
            else:
                fac += 2
            if fac * fac > n:
                break
            e = 1
    if n != 1:
        ans += 1

    print(ans)


if __name__ == '__main__':
    main()
# Original solution
def main():
    n = int(eval(input()))
    ans = 0
    e = 1
    facs = (2 if x == 0 else x * 2 + 1 for x in range(10 ** 6))
    for fac in facs:
        while n % (div := pow(fac, e)) == 0:
            n //= div
            ans += 1
            e += 1
        while n % fac == 0:
            n //= fac
        if fac * fac > n:
            break
        e = 1

    if n != 1:
        ans += 1

    print(ans)


if __name__ == '__main__':
    main()


# Optimized solution
def main():
    n = int(eval(input()))
    ans = 0
    e = 1

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

    for fac in facs():
        while n % (div := pow(fac, e)) == 0:
            n //= div
            ans += 1
            e += 1
        while n % fac == 0:
            n //= fac
        if fac * fac > n:
            break
        e = 1

    if n != 1:
        ans += 1

    print(ans)


if __name__ == '__main__':
    main()
# Original solution
from itertools import accumulate
from collections import defaultdict


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

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

    for fac in facs():
        while fac * fac <= n:
            if n % fac == 0:
                n //= fac
                prime_counter[fac] += 1
            else:
                break
    if n != 1:
        prime_counter[n] += 1

    ans = 0
    for c in list(prime_counter.values()):
        for i, x in enumerate(acc):
            if c < x:
                tmp = i
                break
        ans += tmp
    print(ans)


if __name__ == '__main__':
    main()


# Optimized solution
from itertools import accumulate
from collections import defaultdict


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

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

    for fac in facs():
        while n % fac == 0:
            n //= fac
            prime_counter[fac] += 1
        if fac * fac > n:
            break
    if n != 1:
        prime_counter[n] += 1

    ans = 0
    for c in list(prime_counter.values()):
        for i, x in enumerate(acc):
            if c < x:
                tmp = i
                break
        ans += tmp
    print(ans)


if __name__ == '__main__':
    main()
# Original solution
from itertools import accumulate
from collections import defaultdict


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

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

    for fac in facs():
        count = 0
        while n % fac == 0:
            n //= fac
            count += 1
            # ここで if braek を入れると遅い？
        prime_counter[count] += 1
    if n != 1:
        prime_counter[1] += 1

    ans = 0
    for prime_count, count_count in list(prime_counter.items()):
        for i, x in enumerate(acc):
            if prime_count < x:
                tmp = i
                break
        ans += tmp * count_count
    print(ans)


if __name__ == '__main__':
    main()


# Optimized solution
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()
# Original solution
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()


# Optimized solution
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()