//线性筛 时间复杂度最好
include [HTML_REMOVED]
using namespace std;
const int N = 1e6+10;
int primes[N], cnt;
bool st[N];
void get_prime(int n) {
for(int i=2; i<=n; i)
{
if(!st[i]) primes[cnt] = i;
for(int j=0; primes[j] <= n/i; j++)
{
st[primes[j] * i] = true;
if(i % primes[j] == 0) break;
}
}
}
int main() {
int n; cin >> n;
get_prime(n);
cout << cnt << ‘\n’;
return 0;