qyliang/CodeNanoFix huggingface dataset:
Buggy code:
N = int(input())
N_prime = []

n = N
i = 2
while i <= N**0.5:
    if n%i != 0:
        i += 1
        continue
    
    N_prime.append(i)
    n = n/i
    if n == 1:
        break

if N_prime == []:
    N_prime.append(N)
elif n != 1:
    N_prime.append(int(n))

ct = []
for i in N_prime:
    if i not in ct:
        ct.append(i)
        temp_i = 1
        continue
    temp_i *= i
    if temp_i not in ct:
        ct.append(temp_i)
        temp_i = i
        continue

print(len(ct))

Fixed code:
N = int(input())
N_prime = []

n = N
i = 2
while i <= N**0.5:
    if n%i != 0:
        i += 1
        continue
    
    N_prime.append(i)
    n = n/i
    if n == 1:
        break

if N_prime == [] and N != 1:
    N_prime.append(N)
elif n != 1:
    N_prime.append(int(n))

ct = []
for i in N_prime:
    if i not in ct:
        ct.append(i)
        temp_i = 1
        continue
    temp_i *= i
    if temp_i not in ct:
        ct.append(temp_i)
        temp_i = 1
        continue

print(len(ct))
Buggy code:
import math
N = int(input())
ruteN = math.ceil(math.sqrt(N))
prime=[1]*(ruteN+3)
prime[0]=0
primes=[]
count=0
for i in range(2,ruteN+3,1):
    if prime[i]==1:
        primes.append(i)
        count+=1
        for j in range(i*2,ruteN+3,i):
            prime[j]=0

ans =0
for i in range(0,count,1):
    tmp = primes[i]
    while tmp <= N:
        if N%tmp==0:
            ans += 1
            N = N//tmp
        else:
            while N % primes[i] ==0:
                N=N//primes[i]
            break
        tmp = tmp*primes[i]

if N!=1:
    ans +=1
print(ans)




Fixed code:
import math
N = int(input())
ruteN = math.ceil(math.sqrt(N))
prime=[1]*(ruteN+2)
prime[0]=0
primes=[]
count=0
for i in range(2,ruteN+2,1):
    if prime[i]==1:
        primes.append(i)
        count+=1
        for j in range(i*2,ruteN+2,i):
            prime[j]=0

ans =0
for i in range(0,count,1):
    tmp = primes[i]
    while True:
        if N%tmp==0:
            ans += 1
            N = N//tmp
        else:
            while N % primes[i] == 0:
                N=N//primes[i]
            break
        tmp = tmp*primes[i]

if N!=1:
    ans +=1
print(ans)
Buggy code:
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

yakusu = factorization(n)

ans = 0

for i in range(len(yakusu)):
    l = yakusu[i]
    a,b = l[0],l[1]
    j = 1
    k = 1
    if a != 1:
        while b>=j:
            ans += 1
            j += k
            k += 1
print(ans)

Fixed code:
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

yakusu = factorization(n)

ans = 0

for i in range(len(yakusu)):
    l = yakusu[i]
    a,b = l[0],l[1]
    j = 1
    k = 2
    if a != 1:
        while b>=j:
            ans += 1
            j += k
            k += 1
if n==1:
    print(0)
else:
    print(max(ans,1))
Buggy code:
# coding: utf-8
# Your code here!
import bisect

line=[i*(i+1)//2 for i in range(10**7+1)]

N=int(input())

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

do=[0 for i in range(10**6+1)]

for i in range(2,int(N**0.5)+1):
    while N%i==0:
        N/=i
        do[i]+=1

ans=0
judge=True

for _,item in enumerate(do):
    index=(bisect.bisect_right(line,item))-1
    ans+=index
    if index!=0:
        judge=False

print(ans+1 if judge else ans)




Fixed code:
# coding: utf-8
# Your code here!
import bisect

line=[i*(i+1)//2 for i in range(10**6+1)]

N=int(input())


do=[0 for i in range(10**6+1)]

for i in range(2,int(N**0.5)+1):
    while N%i==0:
        N/=i
        do[i]+=1

ans=0 if N==1 else 1

for _,item in enumerate(do):
    index=(bisect.bisect_right(line,item))-1
    ans+=index

print(ans)
Buggy code:
import math,sys
ans=0
def factorization(n):
    num=0
    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])
            num=num+1
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    return arr,num
def kirisute(n):
    p=(-1+math.sqrt(1+8*n))/2
    q=math.floor(p)
    return q
N=int(input())
if N==1:
  print(0)
soinsuu,jigen=factorization(N)
for i in range(len(soinsuu)):
  ans=ans+kirisute(soinsuu[i][1])
print(ans)

Fixed code:
import math,sys
ans=0
def factorization(n):
    num=0
    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])
            num=num+1
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    return arr,num
def kirisute(n):
    p=(-1+math.sqrt(1+8*n))/2
    q=math.floor(p)
    return q
N=int(input())
if N==1:
  print(0)
  sys.exit()
soinsuu,jigen=factorization(N)
for i in range(len(soinsuu)):
  ans=ans+kirisute(soinsuu[i][1])
print(ans)
Buggy code:
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

factorization(24) 

n = int(input())
P = factorization(n)

Q = []
for p in P:
    
    temp = 1
    while p[1] > 1:
        t = p[0] ** temp
        Q.append(t)
        p[1] -= temp
        temp += 1

print(len(Q))

Fixed code:
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

factorization(24) 

n = int(input())
P = factorization(n)

Q = []
for i in range(len(P)):
    temp = 1
    while P[i][1] >= temp and P[i][0] != 1:
        t = P[i][0] ** temp
        Q.append(t)
        P[i][1] -= temp
        temp += 1

print(len(Q))
Buggy code:
import bisect
ans = 0
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
lis = factorization(N)
suum = [0]*(10**5)
for k in range(1,10**5):
    suum[k] = suum[k-1]+k
for j in range(len(lis)):
    index = bisect.bisect_left(suum,lis[j][1])
    ans += index
    if lis[j][1] == 2:
        ans -= 1
if ans != 1:
    print(ans)
else:
    print(0)

Fixed code:
import bisect
ans = 0
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
lis = factorization(N)
suum = [0]*(10**5)
for k in range(1,10**5):
    suum[k] = suum[k-1]+k
for j in range(len(lis)):
    index = bisect.bisect_right(suum,lis[j][1])
    ans += index
    if lis[j][1] >= 1:
        ans -= 1
if N != 1:
    print(ans)
else:
    print(0)
Buggy code:
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

cnt = 0
n = int(input())
if n == 1:
  print(0)
else:
  f_list = factorization(n)

  for item in f_list:
    power = item[1]
    counter = 1
    while(True):
      power -= counter
      if power<0:
        break
      cnt+=1
      counter+=1
print(cnt)
    

Fixed code:
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

cnt = 0
n = int(input())
#if n == 1:
#  print(0)

f_list = factorization(n)

for item in f_list:
  power = item[1]
  counter = 1
  while(True):
    power -= counter
    if power<0:
      break
    cnt+=1
    counter+=1
if n == 1:
  cnt = 0
print(cnt)
Buggy code:
import math
import decimal


def main():

    N = int(input())
    ans = 0
    A = int(math.ceil(N**0.5)+1)
    explist = []
    if N >= 3:
        for L in range(2, A):
            if N < L:
                break
            d = L
            cnt = 0
            while(True):
                if N % d == 0:
                    N /= d
                    cnt += 1
                else:
                    break
            explist.append([d, cnt])
        for i in explist:
            c = i[1]
            for j in range(1, A):
                if c >= j:
                    ans += 1
                    c -= j
                else:
                    break
        print(ans)
        return
    elif N == 2:
        print(1)
        return
    else:
        print(0)
        return


if __name__ == '__main__':
    main()


Fixed code:
import math
import decimal


def main():

    N = int(input())
    ans = 0
    A = int(math.ceil(N**0.5)+1)
    explist = []
    flag = False
    if N >= 3:
        for L in range(2, A):
            if N < L:
                break
            d = L
            cnt = 0
            while(True):
                if N % d == 0:
                    N /= d
                    cnt += 1
                    flag = True
                else:
                    break
            explist.append([d, cnt])
        for i in explist:
            c = i[1]
            for j in range(1, A):
                if c >= j:
                    ans += 1
                    c -= j
                else:
                    break
        if N >= A:
            ans += 1
        if flag:
            print(ans)
            return
        else:
            print(1)
            return
    elif N == 2:
        print(1)
        return
    else:
        print(0)
        return


if __name__ == '__main__':
    main()
Buggy code:
from collections import Counter
 
def factorize(n):
    a = 2
    fct = []
    while a <= n:
        print('-------')
        while n % a == 0:
            n = n // a
            fct.append(a)
        a += 1
    if n > 1:
        fct.append(n)
    return fct
 
 
n = int(input())
c = Counter(factorize(n))
# print(factorize(n))
# print(c.values())


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

Fixed code:
from collections import Counter
 
def factorize(n):
    a = 2
    fct = []
    while a*a <= n:
        # print('-------')
        while n % a == 0:
            n = n // a
            fct.append(a)
        a += 1
    if n > 1:
        fct.append(n)
    return fct
 
 
n = int(input())
c = Counter(factorize(n))
# print(factorize(n))
# print(c.values())


ans = 0
for v in c.values():
    t = 1
    while v >= t:
        v -= t
        t += 1
        ans += 1
print(ans)
Buggy code:
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

def check(S):
  for i in range(S):
    if S ==1:
      return 1
    elif S == 2:
      return 1
    elif S == 3:
      return 2
    else:
      if i <= S:
        S -= i
      else:
        return i-1

if N != 1:
  result = factorization(N) 

  a = 0
  for r in result:
    b = check(r[1])
    a += b
  print(a)

else:
  print(0)

Fixed code:
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

def check(S):
    if S ==1:
      return 1
    elif S == 2:
      return 1
    elif S == 3:
      return 2
    else:
      for i in range(S):
        if i <= S:
          S -= i
        else:
          return i-1

if N != 1:
  result = factorization(N) 

  a = 0
  for r in result:
    b = check(r[1])
    a += b
  print(a)

else:
  print(0)
Buggy code:
import sys
#import numpy as np
import math
#from fractions import Fraction
#import itertools
#from collections import deque
#import heapq
#from fractions  import gcd
input=sys.stdin.readline
n=int(input())
def factorize(n):
    fct={}
    temp=n
    if temp<4:
        fct[temp]=1
    else:
        e=0
        while temp%2==0:
            temp=temp//2
            e+=1
        if e>0:
            fct[2]=e
    
    for b in range(3,int(n**0.5)+1,2):
        e=0
        while temp%b == 0:
            temp=temp//b
            e+=1
        if e>0:
            fct[b]=e
    if temp!=1:
        fct[temp]=1
    return fct

p=factorize(n)
ans=0
if n==1:
  print(0)
for d in p.keys():
    e=p[d]
    i=1
    while True:
        if e-i>=0:
            ans+=1
            e-=i
            i+=1
            
        else:
            break
print(ans)

Fixed code:
import sys
#import numpy as np
import math
#from fractions import Fraction
#import itertools
#from collections import deque
#import heapq
#from fractions  import gcd
input=sys.stdin.readline
n=int(input())
def factorize(n):
    fct={}
    temp=n
    if temp<4:
        fct[temp]=1
    else:
        e=0
        while temp%2==0:
            temp=temp//2
            e+=1
        if e>0:
            fct[2]=e
    
    for b in range(3,int(n**0.5)+1,2):
        e=0
        while temp%b == 0:
            temp=temp//b
            e+=1
        if e>0:
            fct[b]=e
    if temp!=1:
        fct[temp]=1
    return fct

p=factorize(n)
ans=0
if n==1:
  print(0)
  exit()
for d in p.keys():
    e=p[d]
    i=1
    while True:
        if e-i>=0:
            ans+=1
            e-=i
            i+=1
            
        else:
            break
print(ans)
Buggy code:
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)
    exit()

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

l = list(counts)
ans = 0

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

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

print(ans)

Fixed code:
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)
    exit()

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)
Buggy code:
from math import sqrt
from bisect import bisect


def main():
    N = int(input())
    factor = {}
    max_count = 1
    while N > 1:
        for i in range(2, int(sqrt(N))):
            if N % i == 0:
                N = N // i
                if i in factor:
                    factor[i] += 1
                    if max_count < factor[i]:
                        max_count = factor[i]
                else:
                    factor[i] = 1
                break
        else:
            if N in factor:
                factor[N] += 1
                if max_count < factor[i]:
                    max_count = factor[i]
            else:
                factor[N] = 1
            N = 1

    sum_up = [n * (n + 1) // 2 for n in range(max_count+1)]
    ans = 0
    for prime, count in factor.items():
        ans += bisect(sum_up, count)-1
    print(ans)


if __name__ == "__main__":
    main()


Fixed code:
from math import sqrt
from bisect import bisect


def main():
    N = int(input())
    factor = {}
    max_count = 1
    while N > 1:
        for i in range(2, int(sqrt(N)) + 1):
            if N % i == 0:
                N = N // i
                if i in factor:
                    factor[i] += 1
                    if max_count < factor[i]:
                        max_count = factor[i]
                else:
                    factor[i] = 1
                break
        else:
            if N in factor:
                factor[N] += 1
                if max_count < factor[N]:
                    max_count = factor[N]
            else:
                factor[N] = 1
            N = 1
    sum_up = [n * (n + 1) // 2 for n in range(max_count + 1)]
    ans = 0
    for prime, count in factor.items():
        ans += bisect(sum_up, count)-1
    print(ans)


if __name__ == "__main__":
    main()
Buggy code:
n=int(input())
c=0

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

for i in factorization(n):
  for j in range(1,100000):
    if (j-1)*j<=2*i[1]<j*(j+1):
      c+=j-1
print(c)


Fixed code:
n=int(input())
c=0

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

for i in factorization(n):
  for j in range(1,100000):
    if (j-1)*j<=2*i[1]<j*(j+1):
      c+=j-1
if n!=1:
  print(c)
else:
  print(0)
Buggy code:
import numpy as np
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))

ans = 0
for num in c:
    cnt= 0
    total = 1
    while c[num] > cnt:
        cnt += total
        total += 1
        ans += 1


print(ans)

Fixed code:
import numpy as np
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))

ans = 0
for num in c:
    cnt= 1
    total = 2
    while c[num] >= cnt:
        cnt += total
        total += 1
        ans += 1


print(ans)
Buggy code:
n=int(input())
def fac(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
anss=fac(n)
dic={}
ans=0
for i in anss:
    if i in dic:
        ans+=dic[i]
    elif i==1:
        dic[i]=1
        ans+=1
    else:
        j=i
        ansss=0
        cou=1
        while j>cou:
            ansss+=1
            j-=cou
        ans+=ansss
        dic[i]=ansss
print(ans)

Fixed code:
n=int(input())
if n==1:
    print(0)
else:
    def fac(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
    anss=fac(n)
    dic={}
    ans=0
    for i in anss:
        if i in dic:
            ans+=dic[i]
        elif i==1:
            dic[i]=1
            ans+=1
        else:
            j=i
            ansss=0
            cou=1
            while j>=cou:
                ansss+=1
                j-=cou
                cou+=1
            ans+=ansss
            dic[i]=ansss
    print(ans)
Buggy code:
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()

primes = factorization(N)

ans = 0
for _, cnt in primes:
    n = 0
    while n * (n + 1) // 2 < cnt:
        n += 1
    ans += n

print(ans)

Fixed code:
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()

primes = factorization(N)

ans = 0
for _, cnt in primes:
    n = 0
    while n * (n + 1) // 2 <= cnt:
        n += 1
    ans += n - 1

print(ans)
Buggy code:
def factorization(y):
    arr = []
    temp = y
    for i in range(2, int(-(-y**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([y, 1])
    return arr
n=int(input())
if n==1:
  print(0)
  exit()
ans=0
l=factorization(n)
for i,j in l:
    if j<=2:
      ans+=1
    else:
      t=1
      while j:
        print(j,t)
        if j<t:
          break
        ans+=1
        j-=t
        t+=1           
print(ans)

Fixed code:
def factorization(y):
    arr = []
    temp = y
    for i in range(2, int(-(-y**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([y, 1])
    return arr
n=int(input())
if n==1:
  print(0)
  exit()
ans=0
l=factorization(n)
for i,j in l:
    if j<=2:
      ans+=1
    else:
      t=1
      while j:
        if j<t:
          break
        ans+=1
        j-=t
        t+=1           
print(ans)