#include <iostream>
#include <vector>

using namespace std;

int main(int argc, char *argv[]) {
  int n;
  cin >> n;

  vector<int> nums;
  nums.reserve(n+1);
  for (int i = 0; i <= n; i++)
    nums.push_back(i);

  for (int i = 2; i <= n; i++) {
    if (nums[i] == 0)
      continue;
    int hoge = nums[i];
    for (int j = i+1; j <= n; j++) {
      if (nums[j] == 0)
        continue;
      else if (nums[j] % hoge == 0)
        nums[j] = 0;
    }
  }

  int result = 0;
  for (int i = 2; i <= n; i++)
    if (nums[i])
      result++;
  cout << result << endl;
  return 0;
}