#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("ciur.in");
ofstream fout("ciur.out");
bool v[2000001];
int main() {
int n, i, j, raspuns = 1;
fin >> n;
if(n < 2)
fout << 0;
else {
v[1] = true; // daca e prim => false
v[0] = true;
for(j = 2 * 2; j <= n; j += 2)
v[j] = true;
for(i = 3; i <= n; i += 2) {
if(!v[i]) {
++raspuns;
for(j = i; j <= n / i; j += 1) {
v[j * i] = true;
}
}
}
}
fout << raspuns;
return 0;
}
/*
n = 10;
out = 4?
2: 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32
3: 6, 9, 12, 15, 18, 21, 24, 27, 30
5: 10, 15, 20, 25, 30, 35
7: 14. 21, 28, 35, 42, 49
*/