import java.util.*; public class Main { public static void myout(Object text){//standard output System.out.println(text); } public static void main(String[] args){ Scanner sc = new Scanner(System.in); //String tmp = sc.next(); //int tmp = sc.nextInt(); //Long tmp = sc.nextLong(); Long n = sc.nextLong(); Long output = new Long(0); for(int i = 1; i <= n; i++){ if(n % i == 0){ output += i; } } myout(output); } }