#include #include #include #include #include using namespace std; long long calc(long long n) { if (n == 1LL) return 1LL; long long result = 0, _n = n; vector factors; for (int i = 2; (long long)i * i <= n; ++i) while (n % i == 0) { n /= i; factors.push_back(i); } if (n > 1) factors.push_back(n); result = factors[0] + 1; for (int i = 1; i < factors.size(); ++i) result = result * factors[i] + 1; return result; } int main() { int n; cin >> n; vector a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } long long ans = 0LL; for (int i = 0; i < n; ++i) ans += calc(a[i]); cout << ans << endl; return 0; }