#include <bits/stdc++.h>
using namespace std;
template <typename TH>
void _dbg(const char *sdbg, TH h) {
  cerr << sdbg << "=" << h << "\n";
}
template <typename TH, typename... TA>
void _dbg(const char *sdbg, TH h, TA... t) {
  while (*sdbg != ',') {
    cerr << *sdbg++;
  }
  cerr << "=" << h << ",";
  _dbg(sdbg + 1, t...);
}
template <class T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
};
template <class T>
T lcm(T a, T b) {
  return a * b / gcd(a, b);
};
vector<string> split(string s) {
  istringstream buf(s);
  istream_iterator<string> beg(buf), end;
  vector<string> list(beg, end);
  return list;
}
bool isvowel(char c) {
  string s = "aeiouAEIOU";
  if (find(s.begin(), s.end(), c) != s.end()) return true;
  return false;
}
void sieve(long long n) {
  vector<bool> prime(n + 5, true);
  prime[0] = prime[1] = 0;
  for (int i = 2; i * i <= n; i++) {
    if (prime[i])
      for (int j = i * i; j <= n; j += i) {
        prime[j] = 0;
      }
  }
}
bool isprime(int n) {
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true && (n != 1);
}
bool check(int n) {
  int count = 0;
  for (int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      if (isprime(i)) count++;
      if (i * i != n && isprime(n / i)) count++;
    }
    if (count > 2) return false;
  }
  return count == 2;
}
void solve() {
  int n;
  cin >> n;
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    ans += check(i);
  }
  cout << ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  for (int test_case = 1; test_case <= t; test_case++) {
    solve();
  }
  return 0;
}
