#include<iostream>
#include<cmath>

using namespace std;

int main(){
  int n, i, j, isFound, count;

  while(cin >> n){
    for(i=3, count=1; i<=n; i+=2){
      for(j=3, isFound=0; j<=sqrt(i); j+=2){
	if(i%j == 0){
	  isFound = 1;
	  break;
	}
      }
      if(isFound == 0) count++;
    }
    cout << count << endl;
  }

  return 0;
}