Problem:


Score : 400 points

Problem Statement

Given is a positive integer N. Consider repeatedly applying the operation below on N:

First, choose a positive integer z satisfying all of the conditions below:

z can be represented as z=p^e, where p is a prime number and e is a positive integer;

z divides N;

z is different from all integers chosen in previous operations.

Then, replace N with N/z.

Find the maximum number of times the operation can be applied.

Constraints

All values in input are integers.

1 \leq N \leq 10^{12}

Input

Input is given from Standard Input in the following format:

N

Output

Print the maximum number of times the operation can be applied.

Sample Input 1

24

Sample Output 1

3

We can apply the operation three times by, for example, making the following choices:

Choose z=2 (=2^1). (Now we have N=12.)

Choose z=3 (=3^1). (Now we have N=4.)

Choose z=4 (=2^2). (Now we have N=1.)

Sample Input 2

1

Sample Output 2

0

We cannot apply the operation at all.

Sample Input 3

64

Sample Output 3

3

We can apply the operation three times by, for example, making the following choices:

Choose z=2 (=2^1). (Now we have N=32.)

Choose z=4 (=2^2). (Now we have N=8.)

Choose z=8 (=2^3). (Now we have N=1.)

Sample Input 4

1000000007

Sample Output 4

1

We can apply the operation once by, for example, making the following choice:

z=1000000007 (=1000000007^1). (Now we have N=1.)

Sample Input 5

997764507000

Sample Output 5

7



Sample input:
24


Sample output:
3

Submission status: Wrong Answer

Solution code:
def is_prime(num:int):
    if num == 1:
        return False
    elif num == 2:
        return True
    elif num % 2 == 0:
        return False

    r_num = int(num ** 0.5)
    for i in range(3, r_num + 1, 2):
        if num % i == 0:
            return False
    return True


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

    if n == 1:
        print(0)
        return

    cnt = 0
    r_n = int(n ** 0.5)
    for i in range(2, n):
        if n < i:
            break
        elif cnt == 0 and r_n+1 < i:
            break
        if n % i == 0 and is_prime(i):
            n = int(n/i)
            cnt += 1
            x = 2
            while True:
                q = i ** x
                if q > n:
                    break

                if n % q == 0:
                    n = int(n/q)
                    x += 1
                    cnt += 1
                else:
                    break
            if is_prime(n):
                n = 1
                cnt += 1
                break

    if cnt == 0:
        cnt = 1
    print(cnt)


main()

Submission status: Wrong Answer

Solution 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
tmp = factorization(N)
cnt = 0
for i in range(len(tmp)):
  num = int(tmp[i][1])
  if num <= 2:
    cnt += 1
  elif num <6:
    cnt += 2
  elif num <10:
    cnt += 3
  elif num < 15:
    cnt <= 4
  elif num < 21:
    cnt += 5
  elif num <28:
    cnt += 6
  elif num < 36:
    cnt += 7
  elif num < 45:
    cnt += 8
  else:
    cnt += 9
if N == 1:
  print(0)
else:
  print(cnt)

Submission status: Wrong Answer

Solution code:
n=int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.sort()
    return divisors

divisors=make_divisors(n)
divisors.pop(0)
cnt=0
for div in divisors:
    # print(n,div)
    if n>1 and n%div==0:
        n//=div
        cnt+=1
    elif n<1:
        break
print(cnt)

Submission status: Wrong Answer

Solution code:
n=int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.sort()
    return divisors

divisors=make_divisors(n)
divisors.pop(0)
cnt=0
for div in divisors:
    # print(n,div)
    if n>1 and n%div==0:
        n//=div
        cnt+=1
    elif n>1:
        continue
    else:
        break
print(cnt)

Submission status: Wrong Answer

Solution 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
tmp = factorization(N)
cnt = 0
for i in range(len(tmp)):
  num = int(tmp[i][1])
  if num <= 2:
    cnt += 1
  elif num <= 3:
    cnt += 2
  elif num <6:
    cnt += 2
  elif num <10:
    cnt += 3
  elif num < 15:
    cnt <= 4
  elif num < 21:
    cnt += 5
  elif num <28:
    cnt += 6
  elif num < 36:
    cnt +=7
  else:
    cnt +=8
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
x = 0
for i in range(2, N + 1):
    i2 = i
    if N == 1:
        break
    while N % i2 == 0 & N != 1:
        N //= i2
        x += 1
        i2 *= i2
    i += 1
print(x)

Submission status: Wrong Answer

Solution code:
def is_prime(num:int):
    if num == 1:
        return False
    elif num == 2:
        return True
    elif num % 2 == 0:
        return False

    r_num = int(num ** 0.5)
    for i in range(3, r_num + 1, 2):
        if num % i == 0:
            return False
    return True


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

    if n == 1:
        print(0)
        return

    cnt = 0
    r_n = int(n ** 0.5)
    for i in range(2, r_n + 1):
        if n < i:
            break
        if n % i == 0 and is_prime(i):
            n = int(n/i)
            cnt += 1
            x = 2
            while True:
                q = i ** x
                if q > n:
                    break

                if n % q == 0:
                    n = int(n/q)
                    x += 1
                    cnt += 1
                else:
                    break

    if cnt == 0:
        cnt = 1
    print(cnt)


main()

Submission status: Wrong Answer

Solution code:
def primes(n: int):
    __primes = set(range(2, n + 1))
    for i in range(2, int(n ** 0.5 + 1)):
        __primes.difference_update(range(i * 2, n + 1, i))
    return list(__primes)


def is_prime(num:int):
    if num == 1:
        return False
    elif num == 2:
        return True
    elif num % 2 == 0:
        return False

    r_num = int(num ** 0.5)
    for i in range(3, r_num + 1, 2):
        if num % i == 0:
            return False
    return True


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

    if n == 1:
        print(0)
        return

    cnt = 0
    r_n = int(n ** 0.5)
    for i in range(2, r_n + 1):
        if n % i == 0 and is_prime(i):
            n = int(n/i)
            cnt += 1
            x = 2
            while True:
                q = i ** x
                if q > n:
                    break

                if n % q == 0:
                    n = int(n/q)
                    x += 1
                    cnt += 1
                else:
                    break

    if cnt == 0:
        cnt = 1
    print(cnt)


main()

Submission status: Wrong Answer

Solution code:
def primes(n: int):
    __primes = set(range(2, n + 1))
    for i in range(2, int(n ** 0.5 + 1)):
        __primes.difference_update(range(i * 2, n + 1, i))
    return list(__primes)


def is_prime(num:int):
    if num == 1:
        return False
    elif num == 2:
        return True
    elif num % 2 == 0:
        return False
    elif num == 3:
        return True
    elif num % 3 == 0:
        return False
    elif num == 5:
        return True
    elif num % 5 == 0:
        return False

    r_num = int(num ** 0.5)
    for i in range(7, r_num + 1):
        if num % i == 0:
            return False
    return True


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

    if n == 1:
        print(0)
        return

    cnt = 0
    r_n = int(n ** 0.5)
    for i in range(2, r_n + 1):
        if n % i == 0 and is_prime(i):
            n = int(n/i)
            cnt += 1
            x = 2
            while True:
                q = i ** x
                if q > n:
                    break

                if n % q == 0:
                    n = int(n/q)
                    x += 1
                    cnt += 1
                else:
                    break

    if cnt == 0:
        cnt = 1
    print(cnt)


    #
    #
    #
    # pn = n
    # while pn > 10 ** 7:
    #     pn = int(pn/10)
    #
    # prime_list = primes(pn)
    #
    # pp = []
    # for p in prime_list:
    #     if n % p == 0:
    #         n /= p
    #         pp.append(p)
    #         cnt += 1
    #     elif n < p:
    #         break
    #
    # for p in pp:
    #     x = 2
    #     while True:
    #         q = p ** x
    #         if q > n:
    #             break
    #
    #         if n % q == 0:
    #             n /= q
    #             x += 1
    #             cnt += 1
    #         else:
    #             break
    #
    # if pn != n and cnt == 0:
    #     cnt = 1
    # print(cnt)


main()

Submission status: Wrong Answer

Solution code:
N = int(input())
x = 0
for i in range(2, N + 1):
    if N == 1:
        break
    if N % i == 0:
        N //= i
        x += 1
    i += 1
print(x)

Submission status: Wrong Answer

Solution code:
def primes(n: int):
    __primes = set(range(2, n + 1))
    for i in range(2, int(n ** 0.5 + 1)):
        __primes.difference_update(range(i * 2, n + 1, i))
    return list(__primes)


def is_prime(num:int):
    if num == 1:
        return False
    elif num == 2:
        return True
    elif num % 2 == 0:
        return False
    elif num == 3:
        return True
    elif num % 3 == 0:
        return False
    elif num == 5:
        return True
    elif num % 5 == 0:
        return False

    r_num = int(num ** 0.5)
    for i in range(7, r_num + 1):
        if num % i == 0:
            return False
    return True


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

    if n == 1:
        print(0)
        return

    cnt = 0
    r_n = int(n ** 0.5)
    for i in range(2, r_n + 1):
        if n % i == 0 and is_prime(i):
            n = int(n/i)
            cnt += 1
            x = 2
            while True:
                q = i ** x
                if q > n:
                    break

                if n % q == 0:
                    n /= q
                    x += 1
                    cnt += 1
                else:
                    break

    print(cnt)


    #
    #
    #
    # pn = n
    # while pn > 10 ** 7:
    #     pn = int(pn/10)
    #
    # prime_list = primes(pn)
    #
    # pp = []
    # for p in prime_list:
    #     if n % p == 0:
    #         n /= p
    #         pp.append(p)
    #         cnt += 1
    #     elif n < p:
    #         break
    #
    # for p in pp:
    #     x = 2
    #     while True:
    #         q = p ** x
    #         if q > n:
    #             break
    #
    #         if n % q == 0:
    #             n /= q
    #             x += 1
    #             cnt += 1
    #         else:
    #             break
    #
    # if pn != n and cnt == 0:
    #     cnt = 1
    # print(cnt)


main()

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())

    if n == 1:
        print(0)
        return

    cnt = 0
    r_n = int(n ** 0.5)
    for i in range(2, r_n + 1):
        if n % i == 0:
            n = int(n/i)
            cnt += 1
            x = 2
            while True:
                q = i ** x
                if q > n:
                    break

                if n % q == 0:
                    n /= q
                    x += 1
                    cnt += 1
                else:
                    break

    print(cnt)

    
main()

Submission status: Wrong Answer

Solution code:
N = int(input())
h = N // 2
x = 0
for i in range(2, h + 1):
    if N == 1:
        break
    if N % i == 0:
        N /= i
        x += 1
    i += 1
print(x)

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    ans = 0

    e = 1
    for fac in (2, *(x * 2 + 3 for x in range(1000))):
        while n % (div := pow(fac, e)) == 0:
            n //= div
            ans += 1
            e += 1

        while n % fac == 0:
            n //= fac

        if fac * 3 > n:
            break
        e = 1

    if n != 1:
        ans += 1

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    ans = 0

    e = 1
    for fac in (2, *(x * 2 + 3 for x in range(1000))):
        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()

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    ans = 0

    fac = 2
    e = 1
    for _ in range(1000):
        if n % (div := pow(fac, e)) == 0:
            n //= div
            ans += 1
            e += 1
            continue

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

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    ans = 0

    fac = 2
    e = 1
    for _ in range(60):
        if n % (div := pow(fac, e)) == 0:
            n //= div
            ans += 1
            e += 1
            continue

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

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    ans = 0

    fac = 2
    e = 1
    for _ in range(43):
        if n % (div := pow(fac, e)) == 0:
            n //= div
            ans += 1
            e += 1
            continue

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

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    ans = 0

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

    if n != 1:
        ans += 1

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution 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

from collections import Counter

n = int(input())
if n == 1:
    print(0)
else:
    a = prime_factorize(n)
    c = Counter(a)
    ans = 0
    for v in c.values():
        for i in range(1,100):
            if (i-1) * i < 2 * v <= i*(i+1):
                ans += i
                break
    print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
m=n
i=2
counter_set=set()
tmp=1

while n!=1 :
    if n%i==0:

        n=n//i
        tmp=tmp*i
        if tmp not in counter_set:
            counter_set.add(tmp)
            tmp=1
    else:
        i+=1
        
    if i>=(m)**(1/2) :
        counter_set.add(n)
        break
print(len(counter_set))

Submission status: Wrong Answer

Solution code:
n=int(input())
i=2
counter_set=set()
tmp=1
flag=True
while n!=1 :
    if n%i==0:
        flag=False
        n=n//i
        tmp=tmp*i
        if tmp not in counter_set:
            counter_set.add(tmp)
            tmp=1
    else:
        i+=1
        flag=True
    if i>=(n)**(1/2) and flag:
        counter_set.add(n)
        break
print(len(counter_set))

Submission status: Wrong Answer

Solution 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

from collections import Counter

n = int(input())
if n == 1:
    print(0)
else:
    a = prime_factorize(n)
    c = Counter(a)
    ans = 0
    for v in c.values():
        for i in range(1,100):
            if v == 2:
                ans += 1
                break
            elif (i-1) * i < 2 * v <= i*(i+1):
                print(i,ans)
                ans += i
                break
            else:
                continue
    print(ans)

Submission status: Wrong Answer

Solution code:
import sys

n = int(input())

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

count = 0
i = 2

while True:
    if i * i >= n or i == n:
        print(count + 1)
        break
    if n % i == 0:
        n = n // i
        count += 1
    i += 1

Submission status: Wrong Answer

Solution code:
N = int(input())


def soinnsuubunnkai(num):
    num_list = []
    for i in range(2, N):
        if i % 2 == 0 and i % 3 == 0:
            continue
        else:
            if num%i == 0:
                while num % i == 0:
                    num /= i
                    num_list.append(i)
        if num == 1:
            break
    return num_list


if N == 1:
    print(0)
elif N % 2 != 0 and N % 3 != 0:
    print(1)
else:
    N_list = soinnsuubunnkai(N)
    count = 0
    beforenum = 0
    n = 1
    z = []
    for i in range(len(N_list)):
        tmp = N_list[i]
        if tmp == beforenum or n == 1:
            n *= tmp
        else:
            n = tmp
        beforenum = tmp
        if n in z:
            continue
        else:
            count += 1
            z.append(n)
            n = 1
    print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())


def soinnsuubunnkai(num):
    num_list = []
    for i in range(2, N):
        if i % 2 == 0 and i % 3 == 0:
            continue
        else:
            if num%i == 0:
                while num % i == 0:
                    num /= i
                    num_list.append(i)
        if num == 1:
            break
    return num_list


if N == 1:
    print(0)
elif N % 2 != 0 and N % 3 != 0:
    print(1)
else:
    N_list = soinnsuubunnkai(N)
    count = 0
    beforenum = 0
    n = 1
    z = []
    for i in range(len(N_list)):
        tmp = N_list[i]
        if tmp == beforenum or n == 1:
            n *= tmp
        else:
            n = tmp
        beforenum = tmp
        if n in z:
            continue
        else:
            count += 1
            z.append(n)
            n = 1


    print(count)

Submission status: Wrong Answer

Solution code:
import sys

n = int(input())

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

count = 0
i = 2
while True:
    if i * i >= n:
        break
    if n % i == 0:
        n = n // i
        count += 1
    i += 1

count += 1
print(count)

Submission status: Wrong Answer

Solution code:
def get_prime_factorizations(n):
    """
    [summary]

    Parameters
    ----------
    n : int
        the number factorized by prime numbers.

    Returns
    -------
    dict[int: int]
        prime and exponent pair
        ex.) if n == 40, the function return  {2:3, 5:1} 
    """    
    root_n = int( n**(1/2) )
    primes = {2:0}
    primes.update({i:0 for i in range(3, root_n+1, 2)})
    for i in primes.keys():
        if n == 1:
            primes = {i: v for i, v in primes.items() if v > 0}
            return primes
        # count exponent
        exponent = 0
        while n % i == 0:
            n //= i
            exponent += 1
        # store the prime and exponent
        primes[i] = exponent

    primes = {i: v for i, v in primes.items() if v > 0}
    if len(primes) == 0:
        return {n: 1}
    return primes

n = int(input())
if n == 1:
    print(0)
else:
    primes =  get_prime_factorizations(n)
    result = 0
    for exponent  in primes.values():
        count = 0
        while exponent - count > 0:
            count += 1
            exponent -= count
        result += count
    print(result)

Submission status: Wrong Answer

Solution code:
def get_prime_factorizations(n):
    """
    [summary]

    Parameters
    ----------
    n : int
        the number factorized by prime numbers.

    Returns
    -------
    dict[int: int]
        prime and exponent pair
        ex.) if n == 40, the function return  {2:3, 5:1} 
    """    
    root_n = int( n**(1/2) )
    primes = {2:0}
    primes.update({i:0 for i in range(3, root_n+1, 2)})
    for i in primes.keys():
        if n == 1:
            primes = {i: v for i, v in primes.items() if v > 0}
            return primes
        # count exponent
        exponent = 0
        while n % i == 0:
            n //= i
            exponent += 1
        # store the prime and exponent
        primes[i] = exponent

    primes = {i: v for i, v in primes.items() if v > 0}
    if len(primes) == 0:
        return {n: 1}
    return primes

n = int(input())
if n == 1:
    print(0)
else:
    primes =  get_prime_factorizations(n)
    print(primes)
    result = 0
    for exponent  in primes.values():
        count = 0
        while exponent - count > 0:
            count += 1
            exponent -= count
        result += count
    print(result)

Submission status: Wrong Answer

Solution code:
def get_prime_factorizations(n):
    root_n = int( n**(1/2) )
    primes = {2:0}
    primes.update({i:0 for i in range(3, root_n+1, 2)})
    for i in primes.keys():
        if n == 1:
            primes = {i: v for i, v in primes.items() if v > 0}
            return primes
        # count exponent
        exponent = 0
        while n % i == 0:
            n //= i
            exponent += 1
        # store the prime and exponent
        primes[i] = exponent

    primes = {n: 1}
    return primes

n = int(input())
if n == 1:
    print(0)
else:
    primes =  get_prime_factorizations(n)
    result = 0
    for exponent  in primes.values():
        count = 0
        while exponent - count > 0:
            count += 1
            exponent -= count
        result += count
    print(result)

Submission status: Wrong Answer

Solution code:
import math

def prime(num):
    if num==1:
        return False
    for i in range(2,int(math.sqrt(num))+1):
        if num%i==0:
            return False
    return True

def primeMulti(num):
    f=getFACT(num)
    for x in f:
        if prime(x)==True:
            while x<=num:
                if x==num:
                    return True
                else:
                    x=x*x
    return False
                    
def getFACT(number):
    arr=[i for i in range(2,number+1) if number%i==0]
    return arr


N=eval(input())
count=0
if prime(N)==True:
    count=1
else:
    Z=1
    while N!=1:
        Z+=1
        if prime(N)==True:
            count=count+1
            break
        if N%Z==0 and (prime(Z)==True or primeMulti(Z)==True):
            N=N//Z
            count+=1
print(count)

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
import decimal
import sys
input = sys.stdin.readline


def prime_factor_count(n):
    def count(n, i):
        cnt = 0
        while n % i == 0:
            cnt += 1
            n //= i
        return n, cnt

    d = {}
    if n == 1:
        return d

    n, cnt = count(n, 2)
    d[2] = cnt
    print(d, n)

    lst = [2]
    for num in range(3, int(n ** 0.5) + 1, 2):
        if n == 1:
            break
        for p_num in lst:
            if num % p_num == 0:
                break
            elif p_num * p_num > num:
                lst.append(num)
                n, cnt = count(n, num)
                d[num] = cnt
                break
    else:
        if n != 1:
            d[n] = 1
    return d



def main():
    n = int(input())
    d = prime_factor_count(n)

    cnt = 0
    tmp_n = 0
    for k, v in d.items():
        exp_cnt = 1
        while 1:
            if exp_cnt > v:
                break
            else:
                if tmp_n % (tmp_exp := k ** exp_cnt) == 0:
                    tmp_n //= tmp_exp
                    cnt += 1
                    v -= exp_cnt
                    exp_cnt += 1
    else:
        if n == tmp_n:
            cnt += 1
    print(cnt)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys

n = int(input())

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

count = 0
i = 2
while True:
    if i * i > n:
        break
    if n % i == 0:
        n = n // i
        count += 1
    i += 1

count += 1
print(count)

Submission status: Wrong Answer

Solution code:
import math

def make_divisors(n):#約数列挙
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

def prime_factor(n):#素因数分解
    factors = []
    for i in range(2,int(n**0.5)+1):
        while n%i==0:
            factors.append(i)
            n = n//i
    if n!=1:
        factors.append(n)
    return factors #list化されたものを返すsetにすれば含まれる素数を列挙できる

def get_sieve_of_eratosthenes(n):#素数列挙
    if not isinstance(n, int):
        raise TypeError('n is int type.')
    if n < 2:
        raise ValueError('n is more than 2')
    prime = []
    limit = math.sqrt(n)
    data = [i + 1 for i in range(1, n)]
    while True:
        p = data[0]
        if limit <= p:
            return prime + data
        prime.append(p)
        data = [e for e in data if e % p != 0]

def func(n,c,z):
    c += 1
    n //= z
    return n,c


N = int(input())
eratos = get_sieve_of_eratosthenes(10**5)#素数の生成
eratos_cheak = set(eratos)
used = []#使った整数
count = flag = 0

if len(make_divisors(N))==2:
    print(1)
    exit()

while(flag!=1):

    divisors = make_divisors(N)#z候補

    for i in divisors:
        factor_list = prime_factor(i)#zを素因数分解する
        e = len(factor_list)#条件が当てはまった場合の時のe
        if len(set(factor_list))==1:#factor_listの中身が全て同じ値である場合
            z = i
            for p in eratos:
                if p**e>z:
                    break
                if (p**e == z) and (z not in used) and (N%z==0):#素因数の要素が1つであるか,z**1が素数であるか,前の操作で選んだどの整数とも異なるか
                    used.append(z)
                    N,count = func(N,count,z)
                    break

        else:
            continue
    flag = 1
print(count)