import java.util.*;
import java.lang.*;
import java.io.*;
class Main
{
{
long sumOfDivisors = 1;
Scanner in
= new Scanner
(System.
in); long n = in.nextLong();
HashMap
<Long, Long
> primeDivInPow
= new HashMap
<>(); for(long i = 2; i * i <= n; i++){
while(n % i == 0){
if(primeDivInPow.containsKey(i) == false){
primeDivInPow.put(i, (long) 1);
}
primeDivInPow.put(i, primeDivInPow.get(i) * i);
n /= i;
}
}
if(n != 1){
primeDivInPow.put(n, n);
}
for (Map.
Entry<Long, Long
> entry
: primeDivInPow.
entrySet()) { sumOfDivisors *= (entry.getValue() * entry.getKey() - 1) / (entry.getKey() - 1);
}
System.
out.
println(sumOfDivisors
); }
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBNYWluCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCWxvbmcgc3VtT2ZEaXZpc29ycyA9IDE7CgkJU2Nhbm5lciBpbiA9IG5ldyBTY2FubmVyKFN5c3RlbS5pbik7CiAgICAgICAgbG9uZyBuID0gaW4ubmV4dExvbmcoKTsKICAgICAgICBIYXNoTWFwPExvbmcsIExvbmc+IHByaW1lRGl2SW5Qb3cgPSBuZXcgSGFzaE1hcDw+KCk7CiAgICAgICAgZm9yKGxvbmcgaSA9IDI7IGkgKiBpIDw9IG47IGkrKyl7CgkgICAgICAgIHdoaWxlKG4gJSBpID09IDApewoJICAgICAgICAgICAgaWYocHJpbWVEaXZJblBvdy5jb250YWluc0tleShpKSA9PSBmYWxzZSl7CgkgICAgICAgICAgICAgICAgcHJpbWVEaXZJblBvdy5wdXQoaSwgKGxvbmcpIDEpOwoJICAgICAgICAgICAgfQoJICAgICAgICAgICAgcHJpbWVEaXZJblBvdy5wdXQoaSwgcHJpbWVEaXZJblBvdy5nZXQoaSkgKiBpKT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