#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <functional>
#define F first
#define S second
using namespace std;
typedef pair<int, int> P;
const int INF = 1 << 30, Array = int(1e5);
int main(){
  int n, i, j, sum;
  bool jud;
  while(cin >> n){
    sum = 0;
      for(i = 2;i <= n; i++){
        jud = 0;
        for(j = 2;(j * j) <= i; j++){
          if(i == j)  continue;
          if(!(i % j)){
            jud = 1;
            break;
          }
        }
        if(!jud)
          sum++;
      }
      cout << sum <<endl;
  }
}