#include<iostream>
using namespace std;

int main(){
  
  int n,cnt = 0;

  while(cin >> n){
    int num[n] = {};
    for(int i = 2; i  <= n; i++){
      if(num[i] == 0){
        for(int j = 1; j <(n/i); j++){
          num[i+(j*i)] = 1;
        }
        cnt++;
      }
    }
  cout << cnt << endl;
  }
}