#include #include #include #include #include using namespace std; vector prime; #define N 1000100 void Eratos() { vector NT(N, true); for (int i = 2; i= N) continue; for (int j = i * i; j < N; j += i) NT[j] = false; } } } long long cal(long long x) { long long ans = 1; vector now; for (int i = 0; i<(int)prime.size() && x > 1 && prime[i] <= sqrt(x); i++) { if (x % prime[i] == 0) { while (x % prime[i] == 0) { now.push_back(prime[i]); x /= prime[i]; } } } if (x != 1) now.push_back(x); for (long long y : now) ans = ans * y + 1; return ans; } int main() { int n; cin >> n; Eratos(); vector a(n); long long ans = 0; for (int i = 0; i < n; i++) { cin >> a[i]; ans += cal(a[i]); } cout<