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

public class bigsum_ab implements Runnable {

	final long MAXN = 1000000000000L;
	
	private void solve() throws IOException {
		long n = in.nextLong();
		assert 1 <= n && n <= MAXN;
		BigInteger ans = BigInteger.ONE;
		for (long p = 2; p * p <= n; ++p) {
			if (n % p == 0) {
				int a = 1;
				n /= p;
				long t = 1;
				while (n % p == 0) {
					n /= p;
					t *= p;
					++a;
				}
				ans = ans.multiply(BigInteger.valueOf(t * (p * (a + 1) * (a + 2) / 2 - a * (a + 1) / 2)));
			}
		}
		
		if (n > 1) {
			ans = ans.multiply(BigInteger.valueOf(3 * n - 1));
		}
		
		out.println(ans);
	}

	final String FILE_NAME = "bigsum";

	SimpleScanner in;
	PrintWriter out;

	@Override
	public void run() {
		try {
			in = new SimpleScanner(new FileReader(FILE_NAME + ".in"));
			out = new PrintWriter(FILE_NAME + ".out");
			solve();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			System.exit(-1);
		}
	}

	public static void main(String[] args) {
		new Thread(new bigsum_ab()).start();
	}

	class SimpleScanner extends BufferedReader {

		private StringTokenizer st;
		private boolean eof;

		public SimpleScanner(Reader a) {
			super(a);
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(readLine());
				} catch (Exception e) {
					eof = true;
					return "";
				}
			}
			return st.nextToken();
		}

		boolean seekEof() {
			String s = next();
			if ("".equals(s) && eof)
				return true;
			st = new StringTokenizer(s + " " + st.toString());
			return false;
		}

		private String cnv(String s) {
			if (s.length() == 0)
				return "0";
			return s;
		}

		int nextInt() {
			return Integer.parseInt(cnv(next()));
		}

		double nextDouble() {
			return Double.parseDouble(cnv(next()));
		}

		long nextLong() {
			return Long.parseLong(cnv(next()));
		}
	}
}