#include<stdio.h>
#include<stdlib.h>
typedef long long ll;
int main(void)
{
  ll n,cnt=0,ans=0;
  scanf("%lld",&n);
  ll tmp[n+1];
  for(ll i=1;i<=n;i++) tmp[i]=1;
  tmp[1]=0;
  for(ll i=2;i*i<=n;i++){
    if(tmp[i]==1){
      for(ll j=2;j<=n/i;j++) tmp[i*j]=0;
    }
  }
  for(ll i=2;i<=n;i++){
    if(tmp[i]==1){
      cnt++;
    }
  }
  //printf("%d\n",cnt);
  ll sosu[cnt+1],j=1,sosu_cnt[cnt+1];
  for(ll i=1;i<=n;i++){
    if(tmp[i]==1){
      sosu[j]=i;
      //printf("%d\n",sosu[j]);
      j++;
    }
  }
   for(ll i=1;i<=cnt;i++){
     sosu_cnt[i]=0;
  }
  ll n_tmp;
  n_tmp=n;
  while(n_tmp>1){
    for(ll i=1;i<=cnt;i++){
      if(((n_tmp/sosu[i])*sosu[i]) == n_tmp){
        n_tmp/=sosu[i];
        sosu_cnt[i]++;
        break;
      }
    }
  }
  for(ll i=1;i<=cnt;i++){
    if(sosu_cnt[i]>0){
      ll k=1,h=0;
      while(sosu_cnt[i]>0){
        sosu_cnt[i]-=k;
        k++;
        h++;
      }
      ans+=h;
    }
  }
  printf("%lld\n",ans);
  return 0;

}