using System; using System.Collections.Generic; using System.Linq; using static System.Console; using static System.Math; class Program { static void Main() { var N = long.Parse(ReadLine()); WriteLine(yakusuu(N).Sum()); } public static long[] yakusuu(long n)//O(sqrt N) { if (n < 1) return new long[0];//Assert var r = new List(); for (int i = 1; i * i <= n; i++) { if (n % i == 0) { r.Add(i); if (i * i != n) r.Add(n / i); } } return r.ToArray(); } }