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;
const int mod = 1e9 + 7;
const int N = 3e5 + 7;
namespace pcf {
unsigned int ar[(1000010 >> 6) + 5] = {0};
int len = 0;
int primes[1000010];
int counter[1000010];
int phi_dp[100000][100];
bitset<1000010> isComp;
void Sieve(int N) {
  int i, j, sq = sqrt(N);
  isComp[1] = true;
  for (i = 4; i <= N; i += 2) isComp[i] = true;
  for (i = 3; i <= sq; i += 2) {
    if (!isComp[i]) {
      for (j = i * i; j <= N; j += i + i) isComp[j] = 1;
    }
  }
  for (i = 1; i <= N; i++) {
    if (!isComp[i]) primes[len++] = i;
    counter[i] = len;
  }
}
void init() {
  Sieve(1000010 - 1);
  int k, n, res;
  for (n = 0; n < 100000; n++) phi_dp[n][0] = n;
  for (k = 1; k < 100; k++) {
    for (n = 0; n < 100000; n++) {
      phi_dp[n][k] = phi_dp[n][k - 1] - phi_dp[n / primes[k - 1]][k - 1];
    }
  }
}
long long phi(long long n, int k) {
  if (n < 100000 && k < 100) return phi_dp[n][k];
  if (k == 1) return ((++n) >> 1);
  if (primes[k - 1] >= n) return 1;
  return phi(n, k - 1) - phi(n / primes[k - 1], k - 1);
}
long long Legendre(long long n) {
  if (n < 1000010) return counter[n];
  int lim = sqrt(n) + 1;
  int k = upper_bound(primes, primes + len, lim) - primes;
  return phi(n, k) + (k - 1);
}
long long Lehmer(long long n) {
  if (n < 1000010) return counter[n];
  long long w, res = 0;
  int i, j, a, b, c, lim;
  b = sqrt(n), c = Lehmer(cbrt(n)), a = Lehmer(sqrt(b)), b = Lehmer(b);
  res = phi(n, a) + (((b + a - 2) * (b - a + 1)) >> 1);
  for (i = a; i < b; i++) {
    w = n / primes[i];
    lim = Lehmer(sqrt(w)), res -= Lehmer(w);
    if (i <= c) {
      for (j = i; j < lim; j++) {
        res += j;
        res -= Lehmer(w / primes[j]);
      }
    }
  }
  return res;
}
}  // namespace pcf
int main() {
  long long n;
  cin >> n;
  long long ses = 0;
  pcf::init();
  long long total_prime = pcf::len;
  for (int i = 0; i < total_prime; i++) {
    long long p = pcf::primes[i];
    if (p * p * p > n) break;
    ses++;
  }
  for (int i = 0; i < total_prime; i++) {
    long long p = pcf::primes[i];
    if (p > (n / p)) break;
    ses += pcf::Lehmer(n / p);
    ses -= pcf::Lehmer(p);
  }
  cout << ses << endl;
  return 0;
}