#include <bits/stdc++.h>
using namespace std;
int n, a[1000000], k, cnt, ans;
int main() {
  cin >> n;
  a[0] = 1;
  a[1] = 1;
  a[2] = 0;
  for (int i = 1; i < n; i++) {
    if (a[i] == 0) {
      for (int j = i * i; j <= n; j += i) {
        a[j] = 1;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    cnt = 0;
    for (int j = i; j > 0; j--) {
      if (i % j == 0) {
        k = i / j;
      } else {
        continue;
      }
      if (a[k] == 0) {
        cnt++;
      }
    }
    if (cnt == 2) {
      ans++;
    }
  }
  cout << ans;
}
