Problem1603--筛质数

1603: 筛质数

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Submit

Description

给定一个正整数 n,请你求出 1∼n 中质数的个数。



Input

输入一个数n,计算2-n以内有多少个质数? (n<=10000000)

Output

输出一行一个整数ans,代表2~n之间质数的个数

Sample Input Copy

10000000

Sample Output Copy

664579

HINT

注意选择计算素数的方法。

Source/Category

数组