#include <iostream>
using namespace std;

bool isPrime(unsigned int n) {
  unsigned int count=0;
  count = 0;

  if(n==2) return true;
  if(n%2==0) return false;

  for(int i=3; i<=n/2; i+=2) {
    if(n%i==0) return false;
  }
  return true;
}

int main() {
  unsigned int input;
  unsigned int count;
  
  while(cin >> input) {
    count = 0;
    unsigned int i = 2;
    for(int i=2;i<=input;i++) {
      if(isPrime(i))
        count++;
    }
    cout << count << endl;
  }
  return 0;
}