#include using namespace std; #define ll long long ll tongUocSo(ll N) { ll tong = 0; for (ll i = 1; i * i <= N; i++) { if (N % i == 0) { tong += i; if(i != N / i) tong += N / i; } } return tong; } int main() { ll N; cin >> N; cout << tongUocSo(N) << '\n'; return 0; }