#include <bits/stdc++.h>
using namespace std;
bool prime[4000];
bool Check(int n) {
  int cnt = 0;
  for (int i = 2; i < n; i++)
    if (prime[i] && n % i == 0) cnt++;
  return cnt == 2;
}
int main() {
  memset(prime, true, sizeof(prime));
  prime[2] = true;
  for (int i = 2; i <= 3000; i++)
    if (prime[i])
      for (int j = i + i; j <= 3000; j += i) prime[j] = false;
  int N;
  while (cin >> N) {
    int cnt = 0;
    for (int i = 6; i <= N; i++)
      if (Check(i)) cnt++;
    cout << cnt << endl;
  }
  return 0;
}
