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: Runtime Error)

#include<bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
using in = int64_t;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define Yes cout<<"Yes"<<endl 
#define No cout<<"No"<<endl
#define yes cout<<"yes"<<endl 
#define no cout<<"no"<<endl
#define vec(a,y,x)  vector<vector<char>> a (y,vector<char>(x))
const double PI=3.14159265358979323846;
const in MOD = 1000000007;
const in INF=1e18+7;
const int inf=1e9+7;
const vector<int> dx={1,0,-1,0};
const vector<int> dy={0,1,0,-1};


const in N =1000000/*値*/;
void eratosthenes( bool prime[N]){
    rep(i,N) prime[i] = 1;
    prime[0] = prime[1] = 0;
    rep(i,N){
        if(prime[i]){
            for(int j = i + i; j < N; j+=i){
                prime[j] = 0;
            }
        }
    }
}

int main(){
  in n;
  cin>>n;
  bool prime[N];
  vector<pair<in,int>> p;
  eratosthenes(prime);
  rep(i,N){
    if(prime[i]){
      pair<in,int> a;
      a.first=i;
      a.second=0;
      p.push_back(a);
    }
      
  }
  int adi=0;
  int m = p.size();
  //int M=1;
  /*rep(i,m){
    if(p.at(i).first*p.at(i).first>n) break;
    M=i;
  }*/
  
  while(n>1){
    rep(i,m+1){
      
      if(n%p.at(i).first==0&&i!=m){
        //cout<<p.at(i).first;
        
        p.at(i).second++;
        if(p.at(i).first!=0)
         n=n/p.at(i).first;
        break;
      }
      if(i==m){
        adi=1;
        n=1;
        break;
      }
    }
  }
  
  int ans=adi;
  //cout<<ans<<endl;
  
  rep(i,m){
    int b=p.at(i).second;
    if(b==0) continue;
    if(b<3){
      ans+=1;
      continue;
    }
    if(b<6){
      ans+=2;
      continue;
    }
    if(b<10){
      ans+=3;
      continue;
    }
    if(b<15){
      ans+=4;
      continue;
    }
    if(b<21){
      ans+=5;
      continue;
    }
    if(b<28){
      ans+=6;
      continue;
    }
    if(b<36){
      ans+=7;
      continue;
    }
    ans+=8;
    
  }
 
  
  cout<<ans<<endl;
  /*rep(i,50)
    cout<<p.at(i).first<<" ";*/
  //cout<<m<
}