#include <bits/stdc++.h>
using namespace std;
int main() {
  int m = 1000008;
  bool prime[m];
  for (int i = 0; i < m; ++i) prime[i] = true;
  for (int i = 2; i <= m; ++i) {
    if (prime[i])
      for (long long j = 1LL * i * i; j < m; j += i) prime[j] = false;
  }
  int n;
  cin >> n;
  int res = 0;
  for (int i = 1; i <= n; ++i) {
    int cnt = 0;
    for (int j = 2; j < i; ++j)
      if (i % j == 0 && prime[j]) ++cnt;
    if (cnt == 2) ++res;
  }
  cout << res << "\n";
  return 0;
}
