#C13630. Sum of Primes Below N

    ID: 43190 Type: Default 1000ms 256MiB

Sum of Primes Below N

Sum of Primes Below N

You are given a positive integer \(n\). Your task is to compute the sum of all prime numbers that are less than \(n\). A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself.

To solve this problem efficiently, you may use the Sieve of Eratosthenes algorithm, which eliminates composite numbers and helps you identify prime numbers in a given range.

Example:
For \(n = 10\), the prime numbers less than 10 are 2, 3, 5, and 7, so the sum is \(2+3+5+7=17\).

inputFormat

The input consists of a single integer \(n\) (\(0 \le n \le 10^6\)), provided via standard input (stdin).

outputFormat

Output a single integer representing the sum of all prime numbers less than \(n\). The result should be printed on a single line to standard output (stdout).

## sample
10
17