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

Solution in C++ (GCC 9.2.1) (judge verdict: Accepted)

#include <bits/stdc++.h>
using namespace std;

#define fio                           \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);                    \
    cout.tie(NULL);
#define ll long long
#define ld long double
#define endl "\n"
#define ff first
#define ss second
#define pi pair<ll, ll>
#define PI 3.141592653589793238462643383279502884L
#define mp make_pair
#define pb push_back
#define fall(i, a, b) for (int i = a; i < b; i++)
#define sz(x) (ll) x.size()
#define all(x) x.begin(), x.end()
#define ed cout << "ed";
ll M = 1e9 + 7;
#define int ll


ll poow(ll a, ll b, ll m)
{

    if (b % 2 == 0)
        return (((ll)pow(a, b / 2) % m) * ((ll)pow(a, b / 2) % m)) % m;
    else
        return (((ll)pow(a, (b - 1) / 2) % m) * ((ll)pow(a, (b + 1) / 2) % m)) % m;
}

bool subsum(ll ar[], ll s, ll n)
{
    if (n == 0 && s != 0)
        return false;
    else if (s <= 0)
        return true;

    else if (ar[n - 1] > s)
        return subsum(ar, s, n - 1);
    else
        return (subsum(ar, s - ar[n - 1], n - 1) || subsum(ar, s, n - 1));
}
int binarySearch(int arr[], int l, int r, int x)
{
    if (r >= l)
    {
        int mid = l + (r - l) / 2;

        if (arr[mid] == x)
            return mid;

        if (arr[mid] > x)
            return binarySearch(arr, l, mid - 1, x);

        return binarySearch(arr, mid + 1, r, x);
    }

    return -1;
}
signed main()
{
    fio;
    bool b=false;
   ll a,i,j;
    cin>>a;
    ll cnt=0;
    for(i=1;i*i<=a;i++)
    {
        if(a%i==0 )
            {
            	if(i*i==a)
            		cnt++;
				else
    				cnt+=2;
    		}
    }


    if(cnt==2)
        cout<<"1";
    else{

    	int f=sqrt(a);
        ll isPrime[f+1]={0};
        isPrime[0]=0;
        isPrime[1]=1;
        for(i=2;i*i<=f;i++)
        {
            if(isPrime[i]==0)
                for(j=i*i;j<=f;j+=i)
                    isPrime[j]=1;
        }
        vector<int> v;
        for(i=2;i<=f;i++)
        {if(isPrime[i]==0)
            v.push_back(i);
        }
         map<int,int> fre;
        for(i=0;i<v.size();i++)
        {
            while(a%v[i]==0)
            {
                fre[v[i]]++;
                a=a/v[i];
            }
        }
        int c=0;
        for(auto i=fre.begin();i!=fre.end();i++)
        {
            int in=1;
            int sum=1;
            while(sum<=(i->second))
            {
            in++;
                c++;
               sum+=in;
            }
        }
        if(a>1)c++;
        cout<<c;
    }
    return 0;
}