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 = 1e5 + 10;
const int maxm = 105;
namespace prime {
long long phi[maxn][maxm];
int p[maxn], pi[maxn * 10], cnt;
bool vis[maxn * 10];
inline void init() {
  for (int i = 2; i < maxn * 10; ++i) {
    if (!vis[i]) p[++cnt] = i;
    pi[i] = cnt;
    for (int j = 1; j <= cnt && i * p[j] < maxn * 10; ++j) {
      vis[i * p[j]] = 1;
      if (i % p[j] == 0) break;
    }
  }
  for (int n = 0; n < maxm; ++n)
    for (int m = 0; m < maxn; ++m)
      if (!n)
        phi[m][n] = m;
      else
        phi[m][n] = phi[m][n - 1] - phi[m / p[n]][n - 1];
}
inline long long Phi(long long m, int n) {
  if (n == 0)
    return m;
  else if (p[n] >= m)
    return 1;
  else if (m < maxn && n < maxm)
    return phi[m][n];
  return Phi(m, n - 1) - Phi(m / p[n], n - 1);
}
inline long long Pi(long long m) {
  if (m < maxn) return pi[m];
  int s = sqrt(m), y = cbrt(m), n = pi[y];
  long long res = Phi(m, n) + n - 1;
  for (int i = n + 1; p[i] <= s; ++i) res -= Pi(m / p[i]) - Pi(p[i]) + 1;
  return res;
}
}  // namespace prime
long long n, ans;
int main() {
  prime::init();
  scanf("%lld", &n);
  for (int i = 1; i <= prime::cnt; ++i) {
    long long x = prime::p[i], y = n / x;
    if (x * x > n) break;
    ans += prime::Pi(y) - prime::Pi(x);
  }
  for (int i = 1; i <= prime::cnt; ++i) {
    long long x = prime::p[i];
    if (x * x * x > n) break;
    ++ans;
  }
  printf("%lld\n", ans);
}