#include <iostream>
using namespace std;

bool dec(int value) {
  for (int j = 3; j <= value/2; j += 2) {
    if (value % j == 0) { return false; }
  }
  return true;
}

int main() {
  int n;
  while (cin >> n) {
    int count = 0;
    if (n >= 2) { count++; }
    for (int i = 3; i <= n; i += 2) {
      if (dec(i)) { count++; } 
    }
    cout << count << endl;
  }
  return 0;
}
