using System; using System.Collections.Generic; namespace y { class Program { static void Main(string[] args) { var n = int.Parse(Console.ReadLine()); var s = new List(); int a = 0; for (int i = 2; i < n; i++) { if (s.Contains(i)) continue; else { a += i; int e = i; int c = 2; while (e * c <= n) { s.Add(e * c); c++; } } } Console.WriteLine(a); } } }