#include <stdio.h>
int main()
{
  int i,j,cou=0,n;
  while(scanf("%d",&n)!=EOF){
    cou=0;
    for(i=2;i<=n;i++){
      if(i==2){
	cou++;
	continue;
      }
      for(j=2;j<i;j++){
	if(i%j==0)break;
	if(j==i-1)cou++;
      }
    }
    printf("%d\n",cou);
  }
  return 0;
}