#include using namespace std; vector p; bool criba[1000010]; int n; long long resp,a,sum,prod,b; int main() { ios::sync_with_stdio(false); p.push_back(2); for(int i=3; i<=1000; i+=2) { if(criba[i]) continue; for(int j=i*i; j<=1000000; j+=i) criba[j] = true; } p.push_back(2); for(int i=3; i<=1000000; i+=2) { if(!criba[i]) p.push_back(i); } cin >> n; for(int i=0; i> a; b = a; if(a == 1) { resp++; continue; } sum = 0; prod = 1; for(int j=p.size()-1; j>=0; j--) { while(a%p[j] == 0) { a/=p[j]; prod*=p[j]; sum+=prod; } } if(a!=1) { sum = a; prod = a; for(int j=p.size()-1; j>=0; j--) { while(b%p[j] == 0) { b/=p[j]; prod*=p[j]; sum+=prod; } } } resp+=sum+1; } cout << resp; return 0; }