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.

SAMPLE INPUT
1000

SAMPLE OUTPUT
76127

Solution (in PYTHON):

Solution:
def primes(n):
    au=0
    sieve, ps = [True] * n, []
    for p in xrange(2, n):
        if sieve[p]:
            ps.append(p)
            au=au+p
            for i in xrange(p*p, n, p):
                sieve[i] = False
    return au

n=(long)(raw_input());
p=primes(n)
print(p)