using System; using System.Collections.Generic; class Program { static void Main() { Int64 n = Int64.Parse(Console.ReadLine()); Int64 temp = n * ( n - 1 )/2; Int64 i ; Int64 ans; var list = new List(); i = 2; while(temp != 1) { Int64 count = 0; while (temp % i == 0) { count++; temp /= i; } if (count > 0) list.Add(new Pair(i, count)); i++; } ans = 1; foreach (Pair p in list) { ans *= ((Int64)(Math.Pow(p.x, p.n+1)) - 1) / (p.x - 1); } Console.WriteLine(ans); } } struct Pair { public Int64 x; public Int64 n; public Pair(Int64 x, Int64 n) { this.x = x; this.n = n; } }