#include using ll = long long; using namespace std; ll n, ok=0; int main() { cin.tie(0)->sync_with_stdio(0); cin >> n; for(int i=1; i*i<=n; ++i) { if(n%i==0) { ok+=i; if(n/i!=i) {ok+=n/i;} } } cout << ok; return 0; }