#include <bits/stdc++.h>
using namespace std;
vector<int> a;
vector<bool> isprime(3001, true);
void primes(int n) {
  for (int i = 2; i <= n; i++) {
    if (isprime[i] == true) {
      a.push_back(i);
      for (int j = i * i; j <= n; j = j + i) {
        isprime[j] = false;
      }
    }
  }
}
int main() {
  int n;
  cin >> n;
  primes(n);
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    int check = 0;
    for (int j = 0; j < a.size(); j++) {
      if (a[j] > i) break;
      if ((i > a[j]) && (i % a[j] == 0)) check++;
    }
    if (check == 2) ans++;
  }
  cout << ans << endl;
  return 0;
}
