#include <bits/stdc++.h>
using namespace std;
bool Primes[3001];
void CalcPrimes(int n) {
  int sqrtn = sqrt(n);
  Primes[0] = Primes[1] = 0;
  for (int i = 2; i <= sqrtn; i++) {
    if (Primes[i] == true) {
      for (int j = 2; i * j <= n; j++) {
        Primes[i * j] = false;
      }
    }
  }
}
int main() {
  int n;
  scanf("%d", &n);
  fill(Primes, Primes + n, true);
  CalcPrimes(n);
  int ans = 0;
  int cntr;
  for (int i = 1; i <= n; i++) {
    cntr = 0;
    for (int j = 1; j <= i; j++) {
      if (Primes[j] && (i % j) == 0) cntr++;
    }
    if (cntr == 2) ans++;
  }
  printf("%d\n", ans);
  return 0;
}
