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>
const int maxN = 1e6 + 5;
long long L[maxN], S[maxN];
bool used[maxN];
long long PrimeCount(long long N) {
  long long sn = sqrt(N);
  for (long long i = 1; i <= sn; ++i) {
    used[i] = false;
    S[i] = i - 1;
    L[i] = N / i - 1;
  }
  for (long long p = 2; p <= sn; ++p) {
    if (S[p] == S[p - 1]) continue;
    long long s = S[p - 1];
    long long q = p * p;
    long long range = (p & 1) + 1;
    long long end = std::min(sn, N / q);
    L[1] -= L[p] - s;
    for (long long i = p + range; i <= end; ++i) {
      if (used[i]) continue;
      L[i] -= (i * p <= sn ? L[i * p] : S[N / i / p]) - s;
    }
    if (q <= sn) {
      range *= p;
      for (long long i = q; i < end; i += range) used[i] = true;
    }
    for (long long i = sn; i >= q; --i) S[i] -= S[i / p] - s;
  }
  return L[1];
}
int pri[maxN], cnt[maxN], totP;
bool flag[maxN];
void Euler(int n) {
  for (int i = 2; i <= n; ++i) {
    if (!flag[i]) cnt[pri[++totP] = i] = 1;
    for (int j = 1; pri[j] * i <= n; ++j) {
      flag[i * pri[j]] = true;
      if (i % pri[j] == 0) break;
    }
    cnt[i] += cnt[i - 1];
  }
}
int main() {
  if (fopen("input.txt", "r")) {
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
  }
  long long n, sn;
  std::cin >> n;
  Euler(sn = sqrt(n));
  long long ret = 0;
  for (int i = 1; i <= totP; ++i) {
    ret += (n / pri[i] > sn ? PrimeCount(n / pri[i]) : cnt[n / pri[i]]) -
           cnt[pri[i]];
  }
  long long t = 0;
  while ((t + 1) * (t + 1) * (t + 1) <= n) ++t;
  ret += cnt[t];
  std::cout << ret << std::endl;
  return 0;
}