using System; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { var N = int.Parse(Console.ReadLine()); var A = 0; var list = new List(); for (int i = 1; i <= N; i++) { if (N % i == 0) { list.Add(i); A += i; } } var bunshiOfB = list.Select(x => N / x).Sum(); Console.WriteLine(A * N / bunshiOfB); } }