C++ code :

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll ;
ll count(ll n)
{
return ll((-1 + sqrt(1 + 8 * n)) / 2);
}
unordered_map <ll,ll> b ;
void primeFactors(ll n)
{
while (n % 2 == 0)
{
b[2]++;
n = n/2;
}
// n must be odd at this point. So we can skip
// one element (Note i = i +2)
for (int i = 3; i <= sqrt(n); i = i + 2)
{
while (n % i == 0)
{
b[i]++;
n = n/i;
}
}
if (n > 2){
b[n]++;
}
}
int main()
{
ll n;
b.clear();
cin>>n ;
primeFactors(n);ll gg = 0 ;
for(auto itr = b.begin(); itr!=b.end();++itr){
ll vv = itr->second ;
//cout<<vv;
//cout<<"\n";
gg = gg + (count(vv));
}
gg = gg + n ;
cout << gg;
return 0;
}