import java.io.*;
import java.math.BigInteger;
import java.util.*;

import sun.security.util.BigInt;

public class bigsum_ats_slow_wa implements Runnable {
  public static void main(String[] args) {
    new Thread(new bigsum_ats_slow_wa()).start();
  }

  BufferedReader br;
  PrintWriter out;
  StringTokenizer in;

  public String nextToken() throws IOException {
    while (in == null || !in.hasMoreTokens()) {
      in = new StringTokenizer(br.readLine());
    }
    return in.nextToken();
  }

  public int nextInt() throws IOException {
    return Integer.parseInt(nextToken());
  }

  public long nextLong() throws IOException {
    return Long.parseLong(nextToken());
  }

  public double nextDouble() throws IOException {
    return Double.parseDouble(nextToken());
  }

  public BigInteger get(long val, long d) {
    BigInteger ans = BigInteger.ZERO;
    BigInteger func = BigInteger.ZERO;
    int deg = 0;
    for (int i = 1; i <= val; i *= d) {
      if (i == 0)
        func = BigInteger.ONE;
      else
        func = BigInteger.valueOf(deg * (i - i / d) + i);
      ans = ans.add(func.multiply(BigInteger.valueOf(val / i)));
      deg++;
    }
    return ans;
  }

  public void solve() throws IOException {
    long n = nextLong();
    assert(1 <= n && n <= (long)1e12);
    long nn = n;

    BigInteger ans = BigInteger.ONE;
    for (long i = 2; i <= (long) Math.sqrt(n); i++) {
      if (n % i == 0) {
        long val = 1;
        while (n % i == 0) {
          val *= i;
          n /= i;
        }
        ans = ans.multiply(get(val, i));
      }
    }
    if (n != 1)
      ans = ans.multiply(get(n, n));
    out.println(ans);
  }

  public void run() {
    Locale.setDefault(Locale.US);
    try {
      br = new BufferedReader(new FileReader("bigsum.in"));
      out = new PrintWriter("bigsum.out");

      solve();

      out.close();
    } catch (IOException e) {
      e.printStackTrace();
      System.exit(1);
    }

  }
}
