#include<bits/stdc++.h>
using namespace std;
bool isPrime(long long x){
if(x<2) return false;
for (int i=2;i*i<=x;i++){
if(x%i==0)return false;
}
return true;
}
int main (){
long long n,c=0;
cin>>n;
for(long long i=0;i<=n;i++){
if(isPrime(i))c++;
}
cout<<c;
return 0;
}
豫才我先致谢了!