#include <bits/stdc++.h>
using namespace std;
int m, n = 3000;
bool p[10000];
int prime[10000];
int main() {
  scanf("%d", &m);
  int c = 1;
  prime[1] = 2;
  p[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (p[i] == 0) {
      prime[c] = i;
      c++;
    }
    for (int j = 1; j <= n && i * prime[j] <= n; j++) {
      p[i * prime[j]] = 1;
      if (i % prime[j] == 0) break;
    }
  }
  int sum = 0;
  for (int i = 1; i <= m; i++) {
    int t = 0, o = i;
    for (int j = 1; j <= c - 1; j++) {
      if (prime[j] >= o) break;
      if (o % prime[j] == 0) {
        t++;
      }
    }
    if (t == 2) sum++;
  }
  cout << sum;
  return 0;
}
