#include using namespace std; using ll = long long; #define rep(i,n) for(ll i=0;i<(n);++i) main(){ ll n; cin>>n; auto div = [](ll n){ vector div; for(ll p=1;p*p<=n;++p){ if(n%p==0){ div.emplace_back(p); if(p*p!=n)div.emplace_back(n/p); } } sort(div.begin(),div.end()); return div; }; auto vsum = [](vector const& v){ ll sum = 0; for(auto const& value:v){ sum += value; } return sum; }; auto d = div(n); ll s = vsum(d); cout<<(s)<