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;
template <class T>
int size(const T& x) {
  return x.size();
}
const int INF_INT = numeric_limits<int>::max();
vector<bool> Sieve(int n) {
  vector<bool> is_prime(n + 1, true);
  if (n > 0) is_prime[0] = false;
  if (n > 1) is_prime[1] = false;
  for (int i = 2; (long long)(i)*i <= n; ++i) {
    if (is_prime[i] && (long long)(i)*i <= n) {
      for (int j = i * i; j <= n; j += i) {
        is_prime[j] = false;
      }
    }
  }
  return is_prime;
}
vector<int> primes(int n) {
  auto is_prime = Sieve(n);
  vector<int> ret;
  for (int i = 0; i <= n; ++i) {
    if (is_prime[i]) ret.push_back(i);
  }
  return ret;
}
bool isPrime(long long n) {
  if (n < 2) return false;
  if (n == 2) return true;
  if (n % 2 == 0) return false;
  for (long long i = 3; i * i <= n; i += 2)
    if (n % i == 0) return false;
  return true;
}
bool isPrime(long long n, const vector<int>& primes) {
  if (n < 2) return false;
  if (n == 2) return true;
  if (n % 2 == 0) return false;
  for (int pr : primes)
    if (n % pr == 0) return false;
  return true;
}
vector<pair<long long, int>> primeFactorization(long long n,
                                                const vector<int>& primes) {
  if (n == 1) return {{1, 1}};
  vector<pair<long long, int>> res;
  for (int pr : primes) {
    if (pr > n) break;
    int cnt = 0;
    while (n > 0 && n % pr == 0) {
      cnt++;
      n /= pr;
    }
    if (cnt) res.push_back({pr, cnt});
  }
  if (n != 1) {
    assert(isPrime(n));
    res.push_back({n, 1});
  }
  return res;
}
void AAlmostPrime(std::istream& in, std::ostream& out) {
  int n;
  in >> n;
  vector<int> prms = primes(ceil(sqrt(n)));
  int ret = 0;
  for (int i = 1; i <= n; ++i) {
    if (primeFactorization(i, prms).size() == 2) ret++;
  }
  out << ret << endl;
}
struct Solver {
  void solve(std::istream& in, std::ostream& out) {
    return AAlmostPrime(in, out);
  }
};
int main() {
  std::ios_base::sync_with_stdio(false), std::cin.tie(NULL),
      std::cout.tie(NULL);
  Solver solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}
