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: Wrong Answer)

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef pair<ll,ll> pll;
#define fs first
#define re resize
#define sc second
#define pb push_back
#define eb emplace_back
#define MP make_pair
#define all(x) x.begin(),x.end()
#define mod 1000000007
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define REP(i,n) FOR(i,0,n-1)
#define ins insert
#define mod 1000000007
#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
    template <typename Arg1>
    void __f(const char* name, Arg1&& arg1){
        cout << name << " : " << arg1 << std::endl;
        //use cerr if u want to display at the bottom
    }
    template <typename Arg1, typename... Args>
    void __f(const char* names, Arg1&& arg1, Args&&... args){
        const char* comma = strchr(names + 1, ','); cout.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
    }
#else
#define trace(...)
#endif
#define endl "\n"
void fastIO(){
    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
    #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif   
}
ll modexpo(ll a , ll b){
    if(a==0)return 0;
    if(a==1 or b==0)return 1;
    if(b==1)return a;
    if(b&1) return (a%mod*modexpo(a,b-1)%mod)%mod;
    return modexpo(a%mod * a%mod  ,  b/2 ) % mod;
}
void printv(vll v){
    for(auto&x:v) {
        cout<<x<<" ";
    }
    cout<<endl;
}
string to_string1(ll x){stringstream ss; ss<<x; return ss.str();}
ll to_integer(string s){stringstream ss(s); ll x; ss>>x; return x;}
#define tp9 1000000000 
const ll N = 1e12 + 5;
ld pi = 3.1415926535;
void printYes() {
    cout << "Yes\n";
}
void printNo() {
    cout << "No\n";
}
ll t , n , p ;
string s;

ll solve(ll n) {
    ll ans = 0 ;
    map<ll,ll>mp;
    for(ll i = 2 ; i*i <= n ; i ++) {
        if(n%i==0){
            n/=i;
            mp[i]++;
        }
    }
    if(n>2){
        mp[n]++;
    }
    for(auto p : mp) {
        ll j = p.sc, i = 1 ;
        while((i*(i+1)/2)<=j){
            i++;
        }
        ans+=i-1;
    }
    return ans;
}

int main (){
    ll n ; 
    while(cin >> n) 
    cout<<solve(n)<<endl;
    return 0; 
}