#include <bits/stdc++.h>
using namespace std;
vector<int> primes;
bitset<3001> yup;
void sieve(int tmp) {
  yup.set();
  for (int i = 2; i <= tmp; i++)
    if (yup[i]) {
      for (int j = i * i; j <= tmp; j += i) yup[j] = 0;
      primes.push_back(i);
    }
}
int main() {
  sieve(3000);
  int n, size = primes.size(), ans = 0;
  cin >> n, ++n;
  for (long long i = 1; i < n; i++) {
    int tmp = 0;
    for (long long j = 0; j < size; j++)
      if (primes[j] > i)
        break;
      else if (i % primes[j] == 0)
        tmp++;
    ans += tmp == 2;
  }
  cout << ans << endl;
  return 0;
}
