#include<iostream>
#include<vector>

using namespace std;

#define MAX 1000000

int main(void){

  int n;
  cin >> n;
  int num = 0;

  vector<long int> array(MAX,0);

  array[0] = 2; count++;
  array[1] = 3; count++;

  for(int i = 5 i < n ; i+=2){
    int flag = 0;
    for(int j = 0; array[j]*array[j] <= n;j++){
      if(n % array[i] == 0){
        flag = 1;
        break;
      }
    }
    if(!flag){
      count++;
    }

  }

  cout << count << endl;

  return 0;
}