#include <bits/stdc++.h>
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long int
#define pb push_back
#define mp make_pair
#define f(i,x,n) for(ll i=x;i<n;i++)
#define fl(i,x,n) for(ll i=n;i>=x;i--)
#define mod (ll)1e9+7
#define print(x) cout<<x<<endl
#define vec vector<ll>
#define pai pair<ll, ll>
#define itr(it) :: iterator it
#define MAX (ll)1e16
#define MIN (ll)-1e16
#define X first
#define Y second
#define up upper_bound
#define lo lower_bound
using namespace std;
       ///////////   ///     ///   ///      ///   ////////////  ///      ///
       ///           ///     ///   ///      ///   ///      ///  ///      ///
       ///           ///     ///   ///      ///   ///      ///  ///      ///
       ///////////   ///////////   ///      ///   ////////////  ////////////
               ///   ///     ///   ///      ///   ///      ///  ///      ///
               ///   ///     ///   ///      ///   ///      ///  ///      ///
       ///////////   ///     ///   ////////////   ////////////  ///      ///
ll minn( ll a , ll b) 
{
    if(a>b)
        return b;
    return a;
}
ll maxx2( ll a , ll b)
{
    if(a>b)
        return a;
    return b;
}
ll maxx(ll a,ll b,ll c)
{
  return maxx2(a,maxx2(b,c));
}
ll gcdd(ll a, ll b)
{
    if(b==0)
        return a;
    else
        return gcdd(b,a%b);
}
ll dsum(ll n)
{
    ll sum=0;
    while(n>0)
    {
        sum+=n%10;
        n/=10;
    }
    return sum;
}
ll poww(ll a,ll b)
{
    if(b<=0)
        return 1;
    if(b==1)
        return a;
    if(b==2)
        return (a*a);
    else
        return poww(poww(a,b/2),2)*(poww(a,b%2));
}
ll sumsq(ll x,ll y,ll z)
{
    return (x-y)*(x-y)+(y-z)*(y-z)+(z-x)*(z-x);
} 
signed main() 
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    IOS;
    ll n;
    cin>>n;
    vector<ll> v;
    v.pb(n);
    ll count=0;
    vector<ll> ans;
    if(n==1)
    {
        cout<<0<<endl;
        return 0;
    }
    while(count!=v.size() && v.size()!=0)
    {
        vector<ll> x;
        f(i,0,v.size())
        {
            ll z=sqrt(v[i]),a1=-1,a2=-1;
            f(j,2,z+1)
            {
                if(v[i]%j==0)
                {
                    a1=j;
                    a2=v[i]/j;
                }
            }
            if(a1==-1 && a2==-1)
            {
                count++;
                if(v[i]!=1)
                    ans.pb(v[i]);
            }
            else
            {
                x.pb(a1);
                x.pb(a2);
            }
        }
        v.clear();
        f(i,0,x.size())
        {
            //cout<<x[i]<<" "<<count<<endl;
            v.pb(x[i]);
        }
    }
    sort(ans.begin(),ans.end());
    ll temp=ans[0],num=0,sum=0;
    //cout<<ans.size()<<endl;
    f(i,0,ans.size())
    {
        //cout<<ans[i]<<endl;
        if(ans[i]==temp)
        {
            num++;
        }
        else
        {
            if(num==1)
            { 
                sum++;
                continue;
            }
            double x=num;
            double y=sqrt(1+8*x);
            double z=(y-1)/2;
            ll a1=z;
            //cout<<a1<<endl;
            sum+=a1;
            num=1;
            temp=ans[i];
        }
    }
    //cout<<num<<endl;
    if(num!=0)
    { 
        if(num==1)
        {
            sum++;
            cout<<sum<<endl;
            return 0;
        }
        double x=num;
        double y=sqrt(1+8*x);
        double z=(y-1)/2;
        ll a1=z;
        //cout<<a1<<endl;
        sum+=a1;
        num=0;
    }
    cout<<sum<<endl;
    return 0;
}

Measured memory_bytes: 3684