#include <iostream>
using namespace std;
int n, num, nrprime;
bool prim(int m)
{
int p=1;
for (int j=3; j*j<=m; j+=2)
{
if (m%j==0) {p=0; break;}
}
return p==1;
}
int main()
{
cout << "n= "; cin >> n;
if (n<2) nrprime=0;
if (n==2) nrprime=1;
if (n>2)
{
nrprime=1;
for (num=3; num<=n; num+=2)
{
if (prim(num)) ++nrprime;
}
}
cout << nrprime;
}