#include <stdio.h>
#include <vector>
#include <math.h>
using namespace std;
int main(void) {
  int num;
  while(scanf("%d", &num)==1) {
    vector<int> A;
    int ans;
    int count = 0;
    for (int i = 0; i < num - 1; i++) {
      A.push_back(i+2);
    }
    for (int i = 0; i < num - 1; i++) {
      if(A[i] != 0) {
      int k = 2;
      while(k*A[i] < num + 1) {
        if(A[k*A[i]-2] != 0) {
          A[k*A[i]-2] = 0;
          count++;
        };
        k++;
      }
    }
      if(i > sqrt(num)) break;
    }
    ans = num - 1 - count;
    printf("%d\n",ans);
  }
  return 0;
}

