#include #define ff first #define ss second #define pb push_back #define mp make_pair #define ll long long #define all(a) a.begin(),a.end() #define endl '\n' using namespace std; int n; ll x; int main() { ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); cin>>n; ll ans=0; for(int i=1;i<=n;++i) { cin>>x; if(x==1) { ans+=1; continue; } vector a; int sq=sqrt(x); ll g; for(int j=2;j<=sq;++j) { while(x%j==0) { x/=j; a.pb(j); } } if(x!=1)a.pb(x); g=1; ans+=g; for(int i=a.size()-1;i>=0;i--) { g*=a[i]; ans+=g; } } cout<