PCOUNT - Prime Count

no tags 

How many primes are there between 1 and n where 1 ≤ n ≤ 108. Remember that 1 is not prime.

Input

The number n.

Output

Output the number of primes between 1 and n (inclusive).

Example

Input:
5

Output:
3

hide comments
:D: 2011-10-06 06:20:12

Should be moved to tutorial. There are a lot of very similar problems already, for example CPRIME.


Added by:Paul Draper
Date:2011-10-06
Time limit:0.100s-1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64