qyliang/CodeNanoFix huggingface dataset:
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())
L = factorization(N)
res = 0
for l in L:
    a = int(l[1])
    count = 1
    while True:
        if a >= count:
            a -= count
            res += 1
            count += 1
        else:
            break
print(res)


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()
L = factorization(N)
res = 0
for l in L:
    a = int(l[1])
    count = 1
    while True:
        if a >= count:
            a -= count
            res += 1
            count += 1
        else:
            break
print(res)
Buggy code:
N = int(input())
a = []
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

prime_factorize(N, a)
ans = 0
if len(a) >= 1:
    before = a[0]
    kosuu = 1
    for i in range(1, len(a)):
        tmp = a[i]
        if tmp == before:
            kosuu += 1
        else:
            ini = 1
            while kosuu - ini >= 0:
                kosuu = kosuu - ini
                ini += 1
                ans += 1
            before = tmp
            kosuu = 1
        ini = 1
    while kosuu - ini >= 0:
        kosuu = kosuu - ini
        ini += 1
        ans += 1


print(ans)

Fixed code:
N = int(input())
a = []
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

prime_factorize(N, a)
ans = 0
if len(a) > 1:
    before = a[0]
    kosuu = 1
    for i in range(1, len(a)):
        tmp = a[i]
        if tmp == before:
            kosuu += 1
        else:
            ini = 1
            while kosuu - ini >= 0:
                kosuu = kosuu - ini
                ini += 1
                ans += 1
            before = tmp
            kosuu = 1
        ini = 1
    while kosuu - ini >= 0:
        kosuu = kosuu - ini
        ini += 1
        ans += 1
if len(a) == 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):
            count=0
            while( temp%i == 0):
                count += 1
                temp = temp // i
            arr.append([i, count])

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

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

    return arr

arr = factorization(n)

ans = 0
for (i,j) in arr:
    for k in range(1,100):
        j -= k
        if(j<0):
            break
        ans += 1

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)+10 ):
        if(temp%i == 0):
            count=0
            while( temp%i == 0):
                count += 1
                temp = temp // i
            arr.append([i, count])

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

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

    return arr

arr = factorization(n)

ans = 0
for i,j in arr:
    for k in range(1,100):
        j -= k
        if(j<0):
            break
        ans += 1

print(ans)
Buggy code:
import math
from sys import exit

n=int(input())
primes = {}
i = 2
ans = 0
square = math.floor(math.sqrt(n))

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

# while True:
#     if n == 1 or i > square:
#         break
#     if n % i == 0:
#         if i not in primes.keys():
#             primes[i] = 1
#         else:
#             primes[i] += 1
#         n = n // i
#     else:
#         if i == 2:
#             i += 1
#         else:
#             i += 2
#         continue

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

primes = factorization(n)
if len(primes) == 0:
    print(1)
    exit()

for k,v in primes:
    base = v * 2
    root = math.floor(math.sqrt(base))
    if root * (root + 1) > base:
        root -= 1
    ans += root

print(primes)
print(ans)

Fixed code:
import math
from sys import exit

n=int(input())
primes = {}
i = 2
ans = 0
square = math.floor(math.sqrt(n))

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

# while True:
#     if n == 1 or i > square:
#         break
#     if n % i == 0:
#         if i not in primes.keys():
#             primes[i] = 1
#         else:
#             primes[i] += 1
#         n = n // i
#     else:
#         if i == 2:
#             i += 1
#         else:
#             i += 2
#         continue

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

primes = factorization(n)
if len(primes) == 0:
    print(1)
    exit()

for k,v in primes:
    base = v * 2
    root = math.floor(math.sqrt(base))
    if root * (root + 1) > base:
        root -= 1
    ans += root

print(ans)
Buggy code:
def input_int():
    return map(int, input().split())

def one_int():
    return int(input())

def one_str():
    return input()

def many_int():
    return list(map(int, input().split()))

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

temp = factorization(N)
temp = sorted(temp, key= lambda x: x[0])

output_set = []
output = [ output_set + [t[0]]*t[1] for t in temp ]


count = 0
for i in output:
    temp = len(i)
    sums = 0
    for t in range(1,temp+1):
        sums += t
        if temp >= sums:
            count += 1

print(count)

Fixed code:
def input_int():
    return map(int, input().split())

def one_int():
    return int(input())

def one_str():
    return input()

def many_int():
    return list(map(int, input().split()))

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

temp = factorization(N)
temp = sorted(temp, key= lambda x: x[0])

# temp = [[2,9]]



output_set = []
output = [ output_set + [t[0]]*t[1] for t in temp ]

count = 0
for i in output:
    temp = len(i)
    sums = 0
    for t in range(1,temp+1):
        sums += t
        if temp >= sums:
            count += 1

if N==1:
    print(0)
else:
    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 countstep(a):
    i = 0
    while a>=i+1:
        i += 1
        a -= i
    return i

n = int(input())
a = factorization(n)

if a[0][0]==0:
    print(0)
else:
    count = 0
    for i in range(len(a)):
        count += countstep(a[i][1])
    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 countstep(a):
    i = 0
    while a>=i+1:
        i += 1
        a -= i
    return i

def main():
    n = int(input())
    a = factorization(n)
    
    if n==1:
        print(0)
        return
    
    if a[0][0]==0:
        print(0)
    else:
        count = 0
        for i in range(len(a)):
            count += countstep(a[i][1])
        print(count)

if __name__ == "__main__":
    main()
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

def cnt(a,b):
    if a == 1:
        return b
    else:
        if a - b > 0:
            return cnt(a-b,b+1)
        elif a == b:
            return b
        else:
            return b
    

c = collections.Counter(prime_factorize(n))
cn = 0
for i in c.values():
    cn += cnt(i,1)

print(cn)


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

def cnt(a,b):
    if a >= b:
        return cnt(a-b,b+1)
    else:
        return b - 1
    

c = collections.Counter(prime_factorize(n))
cn = 0
for i in c.values():
    cn += cnt(i,1)

print(cn)

# print(list(c.values()))
Buggy code:
from sys import stdin

def waru(a,b):
  if a%b != 0:
    return 0
  if a/b == 1:
    return b
  return waru(a/b,b)
  

def main():
  s = []
  read = stdin.readline
  N =int(read())
  i = 2
  table = []
  ap = table.append
  while i * i <= N:
    while N%i == 0:
      ap(i)
      N //= i
    i += 1
  if N > 1:
    ap(N)
  set_table = sorted(list(set(table)))
  kaisu = [0] * len(set_table)
  num = 0
  for i in table:
    if i == set_table[num]:
      kaisu[num] += 1
    else:
      num += 1
      kaisu[num] += 1
  maxk = max(kaisu)
  j = 1
  count = 0
  while j <= maxk:
    count += len([i for i in kaisu if i >= j])
    j = j + j + 1
  print(count)
    
      
      

  
  
  
if __name__ == "__main__":
  main()

Fixed code:
from sys import stdin

def waru(a,b):
  if a%b != 0:
    return 0
  if a/b == 1:
    return b
  return waru(a/b,b)
  

def main():
  s = []
  read = stdin.readline
  N =int(read())
  if N == 1:
    print(0)
    exit()
  i = 2
  table = []
  ap = table.append
  while i * i <= N:
    while N%i == 0:
      ap(i)
      N //= i
    i += 1
  if N > 1:
    ap(N)
  set_table = sorted(list(set(table)))
  kaisu = [0] * len(set_table)
  num = 0
  for i in table:
    if i == set_table[num]:
      kaisu[num] += 1
    else:
      num += 1
      kaisu[num] += 1
  maxk = max(kaisu)
  j = 1
  k = 0
  count = 0
  while j <= maxk:
    count += len([i for i in kaisu if i >= j])
    k += 1
    j = j + k + 1
  print(count)
    
      
      

  
  
  
if __name__ == "__main__":
  main()
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
    cnt = 0
    for l in arr:
      i = l[1]
      div = 0
      while 1:
        div += 1
        i -= div
        if i >= 0:
          cnt += 1
        else:
          break
    
    return cnt

print(factorization(N))

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
    cnt = 0
    for l in arr:
        factor = l[0]
        i = l[1]
        if factor != 1:
            div = 0
            while 1:
                div += 1
                i -= div
                if i >= 0:
                    cnt += 1
                else:
                    break

    return cnt


print(factorization(N))
Buggy code:
N=int(input())

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

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

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

    return arr

S = factorization(N)
ans=0
start=1
for i in S:
  U=0
  for j in range(1,i[1]+1):
    U+=j
    ans+=1
    if U>i[1]:
      ans-=1
      break
print(ans)


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

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

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

    return arr

S = factorization(N)
ans=0
start=1
for i in S:
  U=0
  for j in range(1,i[1]+1):
    U+=j
    ans+=1
    if U>i[1]:
      ans-=1
      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

def judge(N):
  n = 0
  cnt = 0
  while n < N:
    n += n+1
    if n<=N:
      cnt += 1
  return cnt


c = collections.Counter(prime_factorize(N))

ans = 0

keys = c.keys()

for i in range(len(keys)):
  ans += judge(c[list(keys)[i]])

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

def judge(N):
  n = 0
  cnt = 0
  while n < N:
    n += cnt+1
    if n<=N:
      cnt += 1
  return cnt


c = collections.Counter(prime_factorize(N))

ans = 0


keys = c.keys()

for i in range(len(keys)):
  ans += judge(c[list(keys)[i]])

print(ans)
Buggy code:

from collections import defaultdict

def prime_factor(n):
    d = defaultdict(int)
    for i in range(2, n + 1):
        if i * i > n:
            break

        while n % i == 0:
            d[i] += 1
            n //= i

    if n != 1:
        d[n] += 1

    return d


N = int(input())
d = prime_factor(N)
ans = 0
for v in d.values():
    i = 1
    res = 0
    while res < v:
        res += i
        i += 1
    ans += i - 1

print(ans)


Fixed code:

from collections import defaultdict

def prime_factor(n):
    d = defaultdict(int)
    for i in range(2, n + 1):
        if i * i > n:
            break

        while n % i == 0:
            d[i] += 1
            n //= i

    if n != 1:
        d[n] += 1

    return d


N = int(input())
d = prime_factor(N)
ans = 0
for v in d.values():
    i = 1
    res = 0
    while res + i <= v:
        res += i
        i += 1
    ans += i - 1

print(ans)
Buggy code:
def factorize(n):
    x = 2
    f = []
    while x**2 <= n:
        c = 0
        if n % x != 0:
            break
        else:
            while n % x == 0:
                n //= x
                c += 1
            f.append([x, c])

    if n > 1:
        f.append([n, 1])
    return f

n = int(input())
f = factorize(n)
ans = 0
for el in f:
    m = el[1]
    i = 1
    while True:
        if i*(i+1)//2 > m:
            ans += i-1
            break
        i += 1

for el in f:
    print(el)
print(ans)

Fixed code:
def factorize(n):
    x = 2
    f = []
    while x**2 <= n:
        c = 0
        if n % x != 0:
            x += 1
            continue
        else:
            while n % x == 0:
                n //= x
                c += 1
            f.append([x, c])
        x += 1

    if n > 1:
        f.append([n, 1])
    return f

n = int(input())
f = factorize(n)
ans = 0
for el in f:
    m = el[1]
    i = 1
    while True:
        if i*(i+1)//2 > m:
            ans += i-1
            break
        i += 1

print(ans)
Buggy code:
#import math
#=input()
n=int(input())
#a,b=map(float,input().split())
#=list(map(int,input().split()))
#=[list(map(int,input().split())) for _ in range()]
import collections
def pf(x):
    a = []
    while x % 2 == 0:
        a.append(2)
        x //= 2
    f = 3
    while f ** 2 <= x:
        if x % f == 0:
            a.append(f)
            x //= f
        else:
            f += 2
    if x != 1:
        a.append(x)
    return a
c = collections.Counter(pf(n))
if n == 1:
    counts = [1]
else:
    values, counts = zip(*c.most_common())
ans = 0
for i in range(len(counts)):
    q = counts[i]
    for j in range(100):
        if (j * (j + 1)) > (2 * q):
            j -= 1
            break
    ans += j
print(ans)

Fixed code:
#import math
#=input()
n=int(input())
#a,b=map(float,input().split())
#=list(map(int,input().split()))
#=[list(map(int,input().split())) for _ in range()]
import collections
def pf(x):
    a = []
    while x % 2 == 0:
        a.append(2)
        x //= 2
    f = 3
    while f ** 2 <= x:
        if x % f == 0:
            a.append(f)
            x //= f
        else:
            f += 2
    if x != 1:
        a.append(x)
    return a
c = collections.Counter(pf(n))
if n == 1:
    counts = [0]
else:
    values, counts = zip(*c.most_common())
ans = 0
for i in range(len(counts)):
    q = counts[i]
    for j in range(100):
        if (j * (j + 1)) > (2 * q):
            j -= 1
            break
    ans += j
print(ans)
Buggy code:
import math
import bisect

N = int(input())

num = N
primeDivisions = []

limit = [1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465, 496, 528, 561, 595, 630, 666, 703, 741, 780]

primeCounts = []
for factor in range(2, int(math.sqrt(N)) + 1):
    if num % factor != 0:
        continue
    count = 0
    while num % factor == 0:
        count += 1
        num //= factor
    primeCounts.append(count)

if len(primeCounts) == 0:
    print(1)
else:
    result = 0
    for count in primeCounts:
        index = bisect.bisect_right(limit, count)
        result += index
    print(result)


Fixed code:
import math
import bisect

N = int(input())

def printCount(N):
    if N <= 1:
        print(0)
        return

    num = N
    primeDivisions = []

    limit = [1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465, 496, 528, 561, 595, 630, 666, 703, 741, 780]

    primeCounts = []
    for factor in range(2, int(math.sqrt(N)) + 1):
        if num % factor != 0:
            continue
        count = 0
        while num % factor == 0:
            count += 1
            num //= factor
        primeCounts.append(count)
    if num != 1:
        primeCounts.append(1)

    if len(primeCounts) == 0:
        print(1)
    else:
        result = 0
        for count in primeCounts:
            index = bisect.bisect_right(limit, count)
            result += index
        print(result)

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

num = int(input())
val = factorization(num)
ans = 0
for x in val:
    if x[0] == 1: break
    val = 0
    for i in range(40):
        val += i + 1
        if x[1] <= val:
            ans += i + 1
            break
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

num = int(input())
val = factorization(num)
ans = 0
for x in val:
    if x[0] == 1: break
    val = 0
    for i in range(40):
        val += i + 1
        if x[1] < val:
            ans += i
            break
print(ans)
Buggy code:
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)
        sys.exit()
    p = factorization(n)
    r = 0
    for pe in p[:][1]:
        r += floor(sqrt(pe*2))
    print(r)

if __name__ == '__main__':
    main()

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

if __name__ == '__main__':
    main()
Buggy code:
def this (k):
  a=int(pow(1+8*k,0.5))
  return (a-1)//2
from collections import Counter
c=Counter([])
n=int(input())
for i in range(2,int(pow(n,0.5))+1):
  if n%i==0:
    sumi=0
    while n%i==0:
      n=n//i
      sumi+=1
    c[i]=sumi
ans=0
for item in c.values():
  ans+=this(item)
print (ans)

Fixed code:
def this (k):
  a=int(pow(1+8*k,0.5))
  return (a-1)//2
from collections import Counter
c=Counter([])
n=int(input())
for i in range(2,int(pow(n,0.5))+1):
  if n%i==0:
    sumi=0
    while n%i==0:
      n=n//i
      sumi+=1
    c[i]=sumi
if n!=1:
  c[n]=1
ans=0
for item in c.values():
  ans+=this(item)
print (ans)