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;
vector<int> isp(1000100);
vector<long long> primes, acum_pi(1000100);
long long sqn, K, phi_table[40000][200];
void crivo_super_modificado_3000_v2_beta() {
  for (int i = 2; i < 1000100; i++) isp[i] = 1;
  for (int i = 2; i < 1000100; i++) {
    if (isp[i]) {
      primes.push_back(i);
      for (int j = 2 * i; j < 1000100; j += i) isp[j] = 0;
    }
    acum_pi[i] = acum_pi[i - 1] + isp[i];
  }
  for (int i = 0; i < 40000; i++) {
    phi_table[i][0] = i;
    for (int k = 1; k < 200; k++) {
      phi_table[i][k] =
          phi_table[i][k - 1] - phi_table[i / primes[k - 1]][k - 1];
    }
  }
}
long long solve(long long n, long long k) {
  if (n < 40000 && k < 200) return phi_table[n][k];
  if (k == 0) return n;
  if (primes[k - 1] > n) return 1;
  return solve(n, k - 1) - solve(n / primes[k - 1], k - 1);
}
long long pi_(long long x) {
  if (x < 1000100) return acum_pi[x];
  long long cubic_root = ceil(pow(x, 1.0 / 3));
  long long k = acum_pi[cubic_root];
  long long ret = solve(x, k) + k - 1;
  while (primes[k] * primes[k] <= x) {
    ret = ret - pi_(x / primes[k]) + k;
    k++;
  }
  return ret;
}
long long n, ans;
int main() {
  crivo_super_modificado_3000_v2_beta();
  scanf("%lld", &n);
  K = ceil(pow(n / log(n), 2.0 / 3));
  for (int i = 0; i < primes.size(); i++) {
    long long pi = primes[i];
    if (pi >= n / pi) break;
    if (pi * pi * pi <= n) ans++;
    ans += pi_(n / pi) - i - 1;
  }
  printf("%lld\n", ans);
  return 0;
}