#include<bits/stdc++.h>
#define endl "\n"
#define IO ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
typedef long long ll;
using namespace std;
int n;
bool su(int n)
{
if(n<2)
{
return false;
}
for(int i=2;i<=sqrt(n);i++)
{
if(n%i==0)
{
return false;
break;
}
}
return true;
}
int main()
{
IO;
cin>>n;
int i=2,j=1;
int mxs=-1;
for(i=2;pow(i,j)<n;i++){
int cnt=1,ans=0;
if(!su(i)){
continue;
}
for(int j=1;pow(i,j)<n;j++){
cnt*=pow(i,j);
if(n%cnt==0){
ans++;
}
else break;
}
mxs=max(mxs,ans);
}
cout<<mxs;
return 0;
}