#include <bits/stdc++.h>
using namespace std;
const int MAX = 1000001;
vector<int> getSieve(int n) {
  vector<int> result(n + 1, 0);
  for (int i = 0; i <= n; i++) result[i] = i;
  for (int i = 2; i * i <= n; i++) {
    if (result[i] == i) {
      for (int j = i; i * j <= n; j++) {
        if (result[i * j] == i * j) result[i * j] = i;
      }
    }
  }
  return result;
}
bool printPrimeFactors(int n, vector<int>& sieve) {
  int prev = sieve[n];
  int k = 1;
  while (n != 1) {
    if (sieve[n] != prev) {
      k++;
      prev = sieve[n];
    }
    n = n / sieve[n];
  }
  return (k == 2);
}
int main() {
  vector<int> sieve = getSieve(MAX);
  int n;
  cin >> n;
  int count = 0;
  for (int i = 1; i <= n; i++) {
    if (sieve[i] != i && printPrimeFactors(i, sieve) == 1) count++;
  }
  cout << count << endl;
  return 0;
}
