#include using namespace std; typedef long long ll; #define pb push_back vector prime; vector isprm(1000001, 1); void Seive(){ int sq=1000; for(int i=2; i<=sq; i++){ if(isprm[i]){ //prime.pb(i); for(int j=i*i; j<1000001; j+=i){ isprm[j]=0; } } } for(int i=2; i<1000001; i++){ if(isprm[i]){ prime.pb(i); } } } int main(){ ios::sync_with_stdio(0); cin.tie(0); Seive(); int n; cin>>n; int sz=prime.size(); ll total=0; while(n--){ ll a; cin>>a; vector factors; for(int i=0; i=0; i--){ ans+=(prev*factors[i]); prev*=factors[i]; } //cout<