#include #include #include #include #include using namespace std; int main() { int n; cin >> n; vector a(n); long long ans =0 ; for (int i = 0; i < n; i++) { cin >> a[i]; vector < long long > divs; for(int j=2;j<=1000000;j++){ while(a[i]%j==0) divs.push_back(j) , a[i]/=j; } if(a[i]>1) divs.push_back(a[i]); long long cur =1 ; ans+=cur; reverse(divs.begin(),divs.end()); for(auto v: divs){ cur*=v; ans+=cur; } } cout<