#include<iostream>
#include<vector>
#include<cmath>
using namespace std;
int main(){
  int n,k;
  while(cin>>n){
    int num=0;
    if(n==1)cout<<num<<endl;
    else{
      for(int i=3;i<=n;i+=2){
	k=0;
	for(int j=3;j<=sqrt(i);j+=2){
	  if(i%j==0){
	    k=1;
	    break;
	  }
	}
	if(k==0)num++;
      }
      cout<<num+1<<endl;
    }
  }
  return 0;
}