1 #include<iostream>
2 using namespace std;
3 bool sushu[210000000];
4 int n,ans;
5 int main()
6 {
7 sushu[1]=sushu[0]=1;
8 cin>>n;
9 for(int i=2;i<=sqrt(n);++i)
10 {
11 if(sushu[i]==0)for(int j=i*i;j<=(n);j+=i)
12 {
13 sushu[j]=1;
14 }
15 }
16 for(int i=1;i<=n;++i)
17 {
18 if(sushu[i]==0)
19 ans++;
20 }
21 cout<<ans;
22 return 0;
23 }