#include <bits/stdc++.h>
using namespace std;
int p[1000], ps;
bool tag[4000];
void init() {
  memset(tag, 255, sizeof(tag));
  tag[0] = tag[1] = false;
  for (int i = 2; i < 4000; i++)
    if (tag[i]) {
      p[ps++] = i;
      for (int j = 2 * i; j < 4000; j += i) tag[j] = false;
    }
}
int main() {
  init();
  int n, ans = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int cnt = 0;
    for (int j = 0; j < ps; j++)
      if (i % p[j] == 0) cnt++;
    if (cnt == 2) ans++;
  }
  printf("%d\n", ans);
}
