import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class Main_yukicoder278 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long n = sc.nextLong(); if (n == 1) { } else if (n % 2 == 1) { } else { n = n / 2; } Map hm = new HashMap(); long nn = n; for (long j = 2; j * j <= nn; j++) { while (n % j == 0) { if (hm.containsKey(j)) { hm.put(j, hm.get(j) + 1); } else { hm.put(j, 1); } n /= j; } } if (n != 1) { if (hm.containsKey(n)) { hm.put(n, hm.get(n) + 1); } else { hm.put(n, 1); } } long ret = 1; for (Map.Entry e : hm.entrySet()) { long tmp = 1; long tmp2 = 1; for (int i = 0; i < e.getValue(); i++) { tmp *= e.getKey(); tmp2 += tmp; } ret *= tmp2; } System.out.println(ret); sc.close(); } }