#include #define FOR(a,b,c) for(int a=(b),_for=(c);a<_for;++a) #define ll long long #define vi vector < int > #define pii pair < int, int > #define x first #define y second #define mp make_pair #define pb push_back using namespace std; const int MAXN = 1000010; ll sol; map < ll, ll > dp; bool PP[MAXN+5]; int p[MAXN+5]; int pos; ll f(ll x){ if (x==1) return 1; if (dp[x]) return dp[x]; ll a=x; FOR(i,0,pos){ if (a%p[i]) continue; while (a>p[i] && !(a%p[i])) a/=p[i]; if (a==p[i]) break; } ll ret=1 + a * f(x / a); return dp[x]=ret; } void solve(){ ll n; scanf ("%lld",&n); sol+=f(n); } int main(){ for (int i=2;i