#include using namespace std; const int N = 1000000 + 1; vector primes; bool sieve[N]; long long maxPrimeDivisor(long long n) { for (int p: primes) { if (p * p > n) { break; } if (n % p == 0) { while (n % p == 0) { n /= p; } if (n == 1) { return p; } } } return n; } long long compute(long long n) { if (n == 1) return 1; long long d = maxPrimeDivisor(n); return (d == n) ? d + 1 : d * compute(n / d) + 1; } int main() { sieve[0] = sieve[1] = 1; for (int i = 2; i < N; ++i) { if (sieve[i] == 1) { continue; } primes.push_back(i); for (int j = i; 1LL * i * j < N; ++j) { sieve[i * j] = 1; } } long long sum = 0, a; int n; cin >> n; for (int i = 0; i < n; ++i) { cin >> a; sum += compute(a); } cout << sum << "\n"; }