using System; using System.Text; using System.Linq; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization.Formatters; using static System.Console; using static System.Math; namespace YukiCoder { public class Program { public static void Main(string[] args) { new Program().Solve(); } public void Solve() { int n = int.Parse(ReadLine()); int sum = 0; for (int i = 1; i <= n; i++) { if (n % i == 0) { sum += i; } } WriteLine(sum); } } }