A number is called almost prime if it has exactly two distinct prime divisors. For example, numbers 6, 18, 24 are almost prime, while 4, 8, 9, 42 are not. Find the amount of almost prime numbers which are between 1 and n, inclusive.

Input

Input contains one integer number n (1 ≤ n ≤ 3000).

Output

Output the amount of almost prime numbers between 1 and n, inclusive.

Examples

Input

10


Output

2


Input

21


Output

8
#include <bits/stdc++.h>
using namespace std;
bool valid[3005];
bool almost[3005];
int pow(int a, int b) {
  int result = 1;
  for (int i = 1; i <= b; i++) result *= a;
  return result;
}
void getprime(int n, int &tot, int ans[3005]) {
  memset(valid, true, sizeof(valid));
  for (int i = 2; i <= n; i++) {
    if (valid[i]) {
      tot++;
      ans[tot] = i;
    }
    for (int j = 1; ((j <= tot) && (i * ans[j] <= n)); j++) {
      valid[i * ans[j]] = false;
      if (i & ans[j] == 0) break;
    }
  }
}
int main() {
  int i, j, k, p, ans[3005], tot = 0, n;
  cin >> n;
  getprime(n, tot, ans);
  for (i = 1; i <= tot; i++) {
    for (j = i + 1; j <= tot; j++) {
      for (k = 1; k <= 11; k++) {
        if ((int)(pow(ans[i], k)) < n && (int)(pow(ans[i], k)) > 0) {
          for (p = 1; p <= 11; p++) {
            if (((int)(pow(ans[i], k)) * (int)(pow(ans[j], p))) <= n) {
              int temp1 = pow(ans[i], k);
              int temp2 = pow(ans[j], p);
              almost[temp1 * temp2] = true;
            } else
              break;
          }
        }
      }
    }
  }
  int count = 0;
  for (i = 2; i <= n; i++) {
    if (almost[i]) {
      count++;
    }
  }
  cout << count << endl;
}
