#include <bits/stdc++.h>
using namespace std;
inline int gcd(int a, int b) {
  int aa = a, bb = b;
  while (bb) {
    int r = aa % bb;
    aa = bb;
    bb = r;
  }
  return aa;
}
inline long long gcd(long long a, long long b) {
  long long aa = a, bb = b;
  while (bb) {
    long long r = aa % bb;
    aa = bb;
    bb = r;
  }
  return aa;
}
inline int lcm(int a, int b) { return a * b / gcd(a, b); }
inline long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
inline int min(int a, int b) {
  if (a < b) return a;
  return b;
}
inline long long min(long long a, long long b) {
  if (a < b) return a;
  return b;
}
inline double min(double a, double b) {
  if (a < b) return a;
  return b;
}
inline int min(int a, int b, int c) { return min(a, min(b, c)); }
inline long long min(long long a, long long b, long long c) {
  return min(a, min(b, c));
}
inline double min(double a, double b, double c) { return min(a, min(b, c)); }
inline int max(int a, int b) {
  if (a > b) return a;
  return b;
}
inline long long max(long long a, long long b) {
  if (a > b) return a;
  return b;
}
inline double max(double a, double b) {
  if (a > b) return a;
  return b;
}
inline int max(int a, int b, int c) { return max(a, max(b, c)); }
inline long long max(long long a, long long b, long long c) {
  return max(a, max(b, c));
}
inline double max(double a, double b, double c) { return max(a, max(b, c)); }
inline int read() {
  register int x = 0;
  register int c = getchar();
  while (c < '0' || c > '9') c = getchar();
  while (c >= '0' && c <= '9') x = x * 10 + (c ^ 48), c = getchar();
  return x;
}
const int maxn = 3010;
bitset<maxn> isp;
int primes[maxn], pCnt;
void getPrimes(int max) {
  isp.set();
  int sqr = sqrt(max);
  isp[0] = isp[1] = false;
  for (register int i = 4; i < max; i += 2) isp[i] = false;
  for (register int i = 3; i < sqr; i += 2)
    if (isp[i])
      for (register int j = i * i; j < max; j += 2 * i) isp[j] = false;
  for (register int i = 2; i < max; ++i)
    if (isp[i]) primes[++pCnt] = i;
}
inline bool almost(int x) {
  int cnt = 0;
  for (int i = 1; primes[i] < x; ++i) {
    if (x % primes[i] == 0)
      if (++cnt > 2) return false;
  }
  return cnt == 2;
}
int main() {
  getPrimes(maxn);
  int n = read();
  int cnt = 0;
  for (int i = 1; i <= n; ++i)
    if (almost(i)) ++cnt;
  printf("%d", cnt);
  return 0;
}
