#include<iostream>
#include<cmath>
#include<stdio.h>
using namespace std;
int main()
{int n;
 while(scanf("%d",&n))
 {int sum=0;
  int i;
  for(int m=2;m<=n;m++)
  {int k=int (sqrt(double(m)));
	  i=2;
   while(m%i&&i<=k)
	   i++;
   if(i>k)sum++;
  }
  printf("%d\n",sum);
 }
}