#include <iostream>
#include <cmath>
using namespace std;

int num;
bool isPrime(int n)
{
   for (int i=2;i<=static_cast<int>(sqrt(static_cast<double>(n)));i++)
   {
      if (n%i==0)
         return false;
   }

   return true;
}
int main()
{
    while(cin>>num)
    {
      int count=1;
   for (int loop=3;loop<=num; loop+=2 )
   {
      if (isPrime(loop))
      {
         count++;
      }
   }
   cout<<count<<endl;
    }
}