#include <iostream>

using namespace std;

int main(void) {
  int n, num, p[100000] = {};
  bool flag;
  p[0] = 2;
  while(cin >> n) {
    if(n == 1) {
      num = 0;
    } else {
      num = 1;
    }
    for(int i = 2; i < n+1; i++) {
      flag = false;
      for(int j = 0; j < num; j++) {
        if(i % p[j] == 0) {
          flag = true;
          break;
        }
      }
      if(flag == false) {
        p[num] = i;
        num++;
      }
    }
    cout << num << '\n';
  }

  return 0;
}