#include using namespace std; #define pb push_back #define mp make_pair #define timesaver ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); const unsigned int mod=1e7+7; #define PI 3.14159265 typedef long long int ll; const long long int N=1e5; int main() { timesaver; ll ans=0,t,j,n; cin>>t; while(t--) { j=3; cin>>n; if(n==1) ans++; else { while(n%2==0){ ans=ans+n , n=n/2; } for(;j<=sqrtl(n);j+=2){ while(n%j==0){ ans=ans+n; n=n/j; } } if(n>2){ ans=ans+n+1; } } } cout<