using System.Collections.Generic; using System; public class Hello { static void Main() { var n = int.Parse(Console.ReadLine().Trim()); var d = PF(n); var ans = 0; foreach(var x in d) ans += x.Key * x.Value; Console.WriteLine(ans); } static Dictionary PF(int n) { var d = new Dictionary(); for (int i = 2; i * i <= n; i++) { if (n % i != 0) continue; var x = 0; while (n % i == 0) { x++; n /= i; } d[i] = x; } if (n != 1) d[n] = 1; return d; } }