#include #include #include #include #include using namespace std; long long int divi(long long int ta) { long long int i = 2; while(i*i <= ta) { if (ta%i==0) { return i; } i += 1; } return ta; } long long int solve(long long int el) { long long int t = 0; while (el!=1) { long long int ro = divi(el); t += el; //cerr << "el : " << el << "/ ro : " << ro << '\n'; el = el / ro; } return t + 1; } int main() { int n; cin >> n; long long int tol = 0; vector a(n); for (int i = 0; i < n; i++) { cin >> a[i]; tol += solve(a[i]); } /* Enter your code here. Print output to STDOUT */ cout << tol; return 0; }