public static ulong Solve() { ulong maxThreshold = 2000000; ulong sum = 0; var primeNumbers = Arithmetic.ApplySieveOfEratosthenes(maxThreshold); foreach (var primeNumber in primeNumbers) { sum += primeNumber; } return(sum); }