Prime Sums

2.5

2 votes
Problem

Problem Statement

Given an integer N, find the sum of all primes < N.


Input Format

The only line of the input file contains a positive integer N.

Output Format

Output the sum of all primes < N.

Constraints

1 ≤ N ≤ 4000000
You are guaranteed that the answer will fit in a 64-bit integer.

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?