Problem: If an integer a is divisible by another integer b, then b is called the divisor of a.

For example: 12 has positive 6 divisors. They are 1, 2, 3, 4, 6 and 12.

Let’s define a function D(n) — number of integers between 1 and n (inclusive) which has exactly four positive divisors.

Between 1 and 10 only the integers 6, 8 and 10 has exactly four positive divisors. So, D(10) = 3.

You are given an integer n. You have to calculate D(n).

Input

The only line contains integer n (1 ≤ n ≤ 1011) — the parameter from the problem statement.

Output

Print the only integer c — the number of integers between 1 and n with exactly four divisors.

Examples

Input

10


Output

3


Input

20


Output

5

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll isqrt(ll x) {
  ll l = 0, r = 1e9;
  while (r - l > 1) {
    ll m = (l + r) / 2;
    if (m * m <= x)
      l = m;
    else
      r = m;
  }
  return l;
}
ll icbrt(ll x) {
  ll l = 0, r = 1e6;
  while (r - l > 1) {
    ll m = (l + r) / 2;
    if (m * m * m <= x)
      l = m;
    else
      r = m;
  }
  return l;
}
vector<int> sieve(int n) {
  vector<bool> b(n + 1);
  for (int i = 3; i * i <= n; i += 2) {
    if (b[i] == 0) {
      for (int j = i * i; j <= n; j += 2 * i) {
        b[j] = 1;
      }
    }
  }
  vector<int> primes = {2};
  for (int i = 3; i <= n; i += 2) {
    if (b[i] == 0) primes.push_back(i);
  }
  return primes;
}
int const sqrt_limit = isqrt(1e16) + 1;
auto primes = sieve(sqrt_limit);
using ii = pair<ll, int>;
map<ii, ll> phi_cache;
ll phi(ll x, int a) {
  if (phi_cache.count({x, a})) return phi_cache[{x, a}];
  if (a == 1) {
    return (x + 1) / 2;
  }
  ll res = phi(x, a - 1) - phi(x / primes[a - 1], a - 1);
  phi_cache[{x, a}] = res;
  return res;
}
map<ll, ll> pi_cache;
ll pi(ll x) {
  if (pi_cache.count(x)) return pi_cache[x];
  if (x < sqrt_limit) {
    return upper_bound(primes.begin(), primes.end(), x) - primes.begin();
  }
  ll a = pi(isqrt(isqrt(x)));
  ll b = pi(isqrt(x));
  ll c = pi(icbrt(x));
  ll res = phi(x, a) + (b + a - 2) * (b - a + 1) / 2;
  for (ll i = a + 1; i <= b; i++) {
    ll w = x / primes[i - 1];
    ll b_i = pi(sqrt(w));
    res -= pi(w);
    if (i <= c) {
      for (ll j = i; j <= b_i; j++) {
        res -= pi(w / primes[j - 1]) - j + 1;
      }
    }
  }
  pi_cache[x] = res;
  return res;
}
int main() {
  ll n;
  cin >> n;
  ll res = 0;
  int i = 1;
  for (ll p : primes) {
    if (p * p > n) break;
    res += pi(n / p) - i;
    i++;
  }
  res += pi(icbrt(n));
  cout << res << "\n";
}