using System; using System.Linq; class Program { static void Main() { var n = long.Parse(Console.ReadLine()); var rootN = (int) Math.Sqrt(n); var ans = (from i in Enumerable.Range(1, rootN) where n % i == 0 let arr = new []{ 0, i, n / i } select (from j in Enumerable.Range(1, 2) where arr[j] != arr[j-1] select arr[j] ).Sum() ).Sum(); Console.Write(ans); } }