#K65227. Sum of First N Prime Numbers
Sum of First N Prime Numbers
Sum of First N Prime Numbers
You are given a positive integer N. Your task is to compute the sum of the first N prime numbers. A prime number is an integer greater than 1 that has no positive divisors other than 1 and itself.
Mathematically, a number ( p ) is prime if and only if ( p > 1 ) and for every integer ( k ) such that ( 2 \le k \le \sqrt{p} ), it holds that ( p \mod k \ne 0 ).
inputFormat
The input consists of a single line containing one integer N (0 ( \le N \le 10^5 )). The value is provided via standard input (stdin).
outputFormat
Output a single integer, which is the sum of the first N prime numbers. The result should be printed to standard output (stdout).## sample
1
2