qyliang/CodeNanoFix huggingface dataset:
Buggy code:
def f(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())
ct=0
a=f(n)
for i in range(len(a)):
    ct2=0
    ct3=1
    c=a[i][1]
    while 1:
        ct2+=ct3
        if ct2>=c:
            ct+=ct3
            break
        ct3+=1
if len(a)>1:
    ct-=1
if n==1:
    ct=0
print(ct)

Fixed code:
def f(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())
ct=0
a=f(n)
for i in range(len(a)):
    ct2=0
    ct3=1
    c=a[i][1]
    while 1:
        ct2+=ct3
        if ct2==c:
            ct+=ct3

            break
        elif ct2>c:
            ct+=ct3-1
            break
        ct3+=1
if n==1:
    ct=0
print(ct)
Buggy code:
N = int(input())

def factorization(n):
    a = []
    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
            a.append([i, cnt])

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

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

    return a

result = factorization(N)

count = 0
for p,i in result:
    if p == 1:
        continue
    for k in range(1, i+1):
        if p ** k > N:
            break
        else:
            N /= p ** k
            count += 1
print(count)


Fixed code:
N = int(input())

def factorization(n):
    a = []
    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
            a.append([i, cnt])

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

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

    return a

result = factorization(N)

count = 0
for p, i in result:
    if p == 1:
        continue
    s = 0
    for k in range(1, i+1):
        if s + k > i:
            break
        else:
            N /= p ** k
            count += 1
            s += k
print(count)
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


def sum_n(n):
    return int(n*(1+n)/2)


N = int(input())

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

fac = factorization(N)
print(fac)

count = 0

for i in range(len(fac)):
    j = 0
    while (True):
        j += 1
        if (sum_n(j) == fac[i][1]):
            break
        elif (sum_n(j) > fac[i][1]):
            j = j - 1
            break

    count += j

print(count)


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


def sum_n(n):
    return int(n*(1+n)/2)


N = int(input())

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

fac = factorization(N)


count = 0

for i in range(len(fac)):
    j = 0
    while (True):
        j += 1
        if (sum_n(j) == fac[i][1]):
            break
        elif (sum_n(j) > fac[i][1]):
            j = j - 1
            break

    count += j

print(count)
Buggy code:
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)

import collections
count = collections.Counter(l)

total = 0
for dup in count.items():
    total += 1
    appear = dup[1]
    if appear > 1:
        ite = 1
        while ite < appear:
            ite = ite + ite + 1
            if ite > appear:
                continue
            total += 1

print(total)


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

import collections
count = collections.Counter(l)

total = 0
for dup in count.items():
    total += 1
    appear = dup[1]
    if appear > 1:
        ite = 1
        accu = 1
        while accu < appear:
            ite += 1
            accu += ite
            if accu > appear:
                continue
            total += 1

print(total)
Buggy code:
import math
N = int(input())
temp = N
arr = []
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])
sum = 0
for i in range(len(arr)):
  p = arr[i][1]
  q = 1
  while p > 0:
    p -= q
    if p >= 0:
      sum += 1
      q += 1
print(sum)

Fixed code:
import math
import sys
N = int(input())
temp = N
arr = []
if N == 1:
  print('0')
  sys.exit()
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])
sum = 0
for i in range(len(arr)):
  p = arr[i][1]
  q = 1
  while p > 0:
    p -= q
    if p >= 0:
      sum += 1
      q += 1
print(sum)
Buggy code:
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 > 0:
            m -= i+1
            cnt += 1

print(cnt)


Fixed code:
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)
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)
ans=0
t=factorization(n)

fg=[]
for i in range(1,16):
    fg.append(i*(i+1)//2)

tmp=[]
for i in range(len(t)):
    cnt=0
    for j in range(len(fg)):
        if t[i][1]>=fg[j]:
            cnt=(j+1)
    ans+=cnt
    g=max(0,cnt-1)
    if t[i][1]-fg[g]>0:
        tmp.append([t[i][0],t[i][1]-fg[cnt-1]])


print(ans+len(tmp)//2)

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

fg=[]
for i in range(1,16):
    fg.append(i*(i+1)//2)

tmp=[]
for i in range(len(t)):
    cnt=0
    for j in range(len(fg)):
        if t[i][1]>=fg[j]:
            cnt=(j+1)
    ans+=cnt

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


def main():
    n_ans = [0]*41
    n = int(input())
    facs = factorization(n)

    curr_n = 1
    for i in range(41):
        curr_sum = (curr_n+1)*(curr_n+2)//2
        if i < curr_sum:
            n_ans[i] = curr_n
        else:
            curr_n+=1
            n_ans[i] = curr_n
    # print(n_ans)
            
    ans = 0
    for fac in facs:
        cnt = fac[1]
        ans += n_ans[cnt]
    print(ans)

if __name__ == "__main__":
    main()

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


def main():
    n_ans = [0]*50
    n = int(input())
    if n==1:
        print(0)
        return
        
    facs = factorization(n)

    curr_n = 1
    for i in range(41):
        curr_sum = (curr_n+1)*(curr_n+2)//2
        if i < curr_sum:
            n_ans[i] = curr_n
        else:
            curr_n+=1
            n_ans[i] = curr_n
    # print(n_ans)
            
    ans = 0
    for fac in facs:
        cnt = fac[1]
        ans += n_ans[cnt]
    print(ans)

if __name__ == "__main__":
    main()
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())
A = factorization(N)
ans = 0
for a,b in A:
    if b < 3:
        ans += 1
    elif b < 6:
        ans += 2
    elif b < 10:
        ans += 3
    elif b < 15:
        ans += 4
    elif b < 21:
        ans += 4
    elif b < 28:
        ans += 5
    elif b < 36:
        ans += 6
    elif b < 45:
        ans += 7
    else:
        ans += 8
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())
A = factorization(N)
if N == 1:
  print(0)
  exit()
ans = 0
for a,b in A:
    if b < 3:
        ans += 1
    elif b < 6:
        ans += 2
    elif b < 10:
        ans += 3
    elif b < 15:
        ans += 4
    elif b < 21:
        ans += 5
    elif b < 28:
        ans += 6
    elif b < 36:
        ans += 7
    elif b < 45:
        ans += 8
    else:
        ans += 9
print(ans)
Buggy code:
import collections
N=int(input())
ans=0
def prime_factorize(n):
    a = []
    count=0
    while n % 2 == 0:
        count+=1
        n //= 2
    a.append(count)
    f = 3
    count=0
    while f * f <= n:
        if n % f == 0:
            count+=1
            n //= f
        else:
            f += 2
            a.append(count)
            count=0
    a.append(count)
    if n != 1:
        a.append(1)
    return a
c = prime_factorize(N)
for i in range(len(c)):
    a=c[i]
    for j in range(1,c[i]+1):
        if a>=j:
            ans+=1
            a-=j
        else:
            break
print(ans)

Fixed code:
N=int(input())
ans=0
def prime_factorize(n):
    a = []
    count=0
    while n % 2 == 0:
        count+=1
        n //= 2
    if count!=0:a.append(count)
    f = 3
    count=0
    while f * f <= n:
        if n % f == 0:
            count+=1
            n //= f
        else:
            f += 2
            if count!=0:a.append(count)
            count=0
    if f==n:
        count+=1
        n=1
    if count!=0:a.append(count)
    if n != 1:
        a.append(1)
    return a
c = prime_factorize(N)
for i in range(len(c)):
    a=c[i]
    for j in range(1,c[i]+1):
        if a>=j:
            ans+=1
            a-=j
        else:
            break
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())
total = 0
if n == 1:
    print("0")
else:
    for i in factorization(n):
        t = 1
        while 1:
            if i[1]-t < 0:
                break
            else:
                total += 1
                i[1] -= t
                t += 1
print(total)


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())
total = 0
if n == 1:
    pass
else:
    for i in factorization(n):
        t = 1
        while 1:
            if i[1]-t < 0:
                break
            else:
                total += 1
                i[1] -= t
                t += 1
print(total)
Buggy code:
# prime factorization
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 = factorization(n)
cnt = 0
if n == 1:
    print("0")
    exit()
for i in ans:
    print(i)
    num = i[1]
    j = 1
    while num - j >= 0:
        num = num - j
        j +=1
        cnt +=1
print(cnt)

Fixed code:
# prime factorization
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 = factorization(n)
cnt = 0
if n == 1:
    print("0")
    exit()
for i in ans:
    num = i[1]
    j = 1
    while num - j >= 0:
        num = num - j
        j +=1
        cnt +=1
print(cnt)
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

def get_z(factor):
    for f_list in factor:
        for i in range(f_list[1]):
            z = f_list[0] ** (i + 1)
            if z not in choice_list:
                choice_list.append(z)
                return z

n = int(input())
factor = factorization(n)

choice_list = []

while n > 1:
    z = get_z(factor)
    if z is None:
        break
#     print(z)
#     print(choice_list)
    n //= z
    factor = factorization(n)
#     print(z)

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

def get_z(factor):
    for f_list in factor:
        for i in range(f_list[1]):
            z = f_list[0] ** (i + 1)
            if z not in choice_list:
                choice_list.append(z)
                return z

choice_list = []
n = int(input())
factor = factorization(n)

while n > 1:
    z = get_z(factor)
    if z is None:
        break
#     print(z)
#     print(choice_list)
    n //= z
    factor = factorization(n)
#     print(z)
print(len(choice_list))
Buggy code:
def factorization(n):
    if(n == 1):
        return []
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

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

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

    return arr

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

#print(solve(24))
#print(solve(1))
#print(solve(64))
#print(solve(1000000007))
#print(solve(997764507000))

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


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

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

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

    return arr

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

#print(solve(24))
#print(solve(1))
#print(solve(64))
#print(solve(1000000007))
#print(solve(997764507000))

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

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

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

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

    return arr

x = factorization(n)
ans = 0

for i, j in x:
    cnt = 1
    while j >= 1:
        if j == 1:
            ans += 1
            j -= 1
        elif j > 1:
            ans += 1
            j -= cnt
        cnt += 1
        if cnt > j:
            break

print(ans)


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

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

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

    return arr

x = factorization(n)
ans = 0

for i, j in x:
    cnt = 1
    while j >= 1:
        if j == 1:
            ans += 1
            j -= 1
        elif j > 1:
            ans += 1
            j -= cnt
        cnt += 1
        if cnt > j:
            break

print(ans)
Buggy code:
n = int(input())
p = []
n2 = n
# for i in range(2,int(n2**0.5//1 + 1)):
for i in range(2,n):
  index = 0
  while n2%i == 0:
    index+=1
    n2 = n2//i
  if index != 0:
    p.append(index)
  else:
    continue
count = 0
t = 1

if n == 1:
  print(0)
elif not p:
  print(1)
else:
  for i in range(len(p)):
    while p[i] - t >= 0:
      p[i]-=t
      count+=1
      t+=1
    t = 1
  print(count)

Fixed code:
n = int(input())
p = []
n2 = n
for i in range(2,int(n2**0.5//1 + 1)):
  index = 0
  while n2%i == 0:
    index+=1
    n2 = n2//i
  if index != 0:
    p.append(index)
  else:
    continue
count = 0
t = 1

if n2 == 1:
  next
else:
  count+=1

if n == 1:
  print(0)
elif not p:
  print(1)
else:
  for i in range(len(p)):
    while p[i] - t >= 0:
      p[i]-=t
      count+=1
      t+=1
    t = 1
  print(count)
Buggy code:
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())
f=prime_factorize(n)
if len(f)==0:
  print(0)
  exit()
s=set(f)
r=0

def func(m):
  r=1
  for ii in range(m):
    if m>ii+1:
      m-=(ii+1)
      r+=1
    else:
      break
  return r

for ii in s:
  m=f.count(ii)
  #print(m,func(m))
  r+=func(m)
  
print(r)

Fixed code:
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())
f=prime_factorize(n)
if len(f)==0:
  print(0)
  exit()
s=set(f)
r=0

def func(m):
  r=0
  for ii in range(m):
    if m>=ii+1:
      m-=(ii+1)
      r+=1
      #print(ii+1,m,r)
    else:
      break
  return r

for ii in s:
  m=f.count(ii)
  fm=func(m)
  #print("ii",ii,fm)
  r+=fm
  
print(r)
Buggy code:
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)


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


def main():
    N = int(input().strip())
    if N == 1:
        return 0
    factors = factorization(N)
    ans = 0
    for factor in factors:
        counter = 1
        while True:
            if factor[1] >= counter:
                factor[1] -= counter
                counter += 1
                ans += 1
            else:
                break
    return ans

Fixed code:
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)


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


def main():
    N = int(input().strip())
    if N == 1:
        return 0
    factors = factorization(N)
    ans = 0
    for factor in factors:
        counter = 1
        while True:
            if factor[1] >= counter:
                factor[1] -= counter
                counter += 1
                ans += 1
            else:
                break
    return ans


if __name__ == "__main__":
    print(main())