#include<iostream>
#include<cmath>
#define FOR(x,s,g) for(int x=(s);x<=(g);x++)
using namespace std;

int main(){
  int n;
  while(cin>>n){
    int count=0;
    FOR(i,2,n){
      int e=sqrt(i);
      FOR(j,2,e){
	if(i%j==0){
	  goto end;
	}
      }
      count++; 
    end:
      ;
    }
    cout<<count<<endl;
  }
  return 0;
}