#include <iostream>
using namespace std;

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