// Bismillahirohmanirohiim #include using namespace std; #define nl "\n" #define PB push_back #define SZ size() #define ios ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define MP make_pair long long int ans = 0 ; long long int x ; void solve(long long int n) { bool f = 1 ; for(int i=2 ; i <= sqrt(n) ; i++) { if(n%i==0) { f = 0 ; x+=(n/i); solve(n/i); break ; } } if(f) x++ ; } int main() { ios; long long int t ; cin >> t ; while(t--) { x = 0 ; long long int n ; cin >> n ; solve(n); if(n>1) x+=n; ans+=x ; } cout << ans << nl ; }