#include <bits/stdc++.h>
using namespace std;
int a[3005];
int main() {
  memset(a, 0, sizeof a);
  int n, l = 0, h = 0;
  cin >> n;
  for (int i = 2; i <= 3005; i++) {
    if (a[i] == 0) {
      for (int j = i; j * i <= n; j++) {
        a[j * i] = 1;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    l = 0;
    for (int j = 2; j <= i; j++) {
      if (i % j == 0 && a[j] == 0) {
        l++;
      }
    }
    if (l == 2) {
      h++;
    }
  }
  cout << h;
}
