import java.util.*;
import java.lang.*;
import java.io.*;
class Main
{
{
long n, gcd, primeNumInPow, power;
Scanner in
= new Scanner
(System.
in); while(in.hasNextLong()){
n = in.nextLong();
gcd = 1;
for(long i = 2; i * i <= n; i++) {
if(n % i == 0) {
power = 0; primeNumInPow = 1;
while(n % i == 0) {
power++;
primeNumInPow *= i;
n /= i;
}
gcd *= (power + 1)*primeNumInPow - power*primeNumInPow/i;
}
}
if (n > 1) gcd *= (2*n - 1);
}
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBNYWluCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCWxvbmcgbiwgZ2NkLCBwcmltZU51bUluUG93LCBwb3dlcjsKCQlTY2FubmVyIGluID0gbmV3IFNjYW5uZXIoU3lzdGVtLmluKTsKICAgIAl3aGlsZShpbi5oYXNOZXh0TG9uZygpKXsKICAgIAkJbiA9IGluLm5leHRMb25nKCk7CiAgICAgICAgCWdjZCA9IDE7CiAgICAgICAgCWZvcihsb25nIGkgPSAyOyBpICogaSA8PSBuOyBpKyspIHsKICAgICAgICAgICAgCWlmKG4gJSBpID09IDApIHsKICAgICAgICAgICAgICAgIAlwb3dlciA9IDA7IHByaW1lTnVtSW5Qb3cgPSAxOwogICAgICAgICAgICAgICAgCXdoaWxlKG4gJSBpID09IDApIHsKICAgICAgICAgICAgICAgICAgICAJcG93ZXIrKzsKICAgICAgICAgICAgICAgICAgICAJcHJpbWVOdW1JblBvdyAqPSBpOwogICAgICAgICAgICAgICAgICAgIAluIC89IGk7CiAgICAgICAgICAgICAgICAJfQogICAgICAgICAgICAgICAgCWdjZCAqPSAocG93ZXIgKyAxKSpwcmltZU51bUluUG93IC0gcG93ZXIqcHJpbWVOdW1JblBvdy9pOwogICAgICAgICAgICAJfQogICAgICAgIAl9ICAgICAgIAogICAgICAgIAlpZiAobiA+IDEpIGdjZCAqPSAoMipuIC0gMSk7CiAgICAgICAgCVN5c3RlbS5vdXQucHJpbnRsbihnY2QpOwogICAgCX0KCX0KfQ==