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;
bool p[MAXN];
int prime[MAXN], cnt, tot;
long long n;
int lim;
int id1[MAXN], id2[MAXN];
long long sm[MAXN], di[MAXN];
inline int getid(long long x) {
  if (x <= lim) return id1[x];
  return id2[n / x];
}
inline void prework(int lim) {
  for (int i = 2; i <= lim; ++i) {
    if (!p[i]) prime[++cnt] = i;
    for (int j = 1; j <= cnt && 1ll * i * prime[j] <= lim; ++j) {
      p[i * prime[j]] = 1;
      if (!(i % prime[j])) break;
    }
  }
}
int main() {
  scanf("%lld", &n);
  lim = std::sqrt(1.0 * n) + 1;
  prework(lim);
  for (long long l = 1, r; l <= n; l = r + 1) {
    long long x = n / l;
    r = n / x;
    if (x <= lim)
      id1[x] = ++tot;
    else
      id2[r] = ++tot;
    di[tot] = x;
  }
  for (int i = 1; i <= tot; ++i) sm[i] = di[i] - 1;
  for (int i = 1; i <= cnt; ++i) {
    int p = prime[i];
    for (int j = 1; j <= tot; ++j) {
      long long n = di[j];
      if (1ll * p * p > n) break;
      sm[j] -= sm[getid(n / p)] - (i - 1);
    }
  }
  long long ans = 0;
  for (int i = 1; i <= cnt; ++i) {
    ans += std::max(0ll, sm[getid(n / prime[i])] - i);
  }
  for (int i = 1; i <= cnt; ++i) {
    if (1ll * prime[i] * prime[i] * prime[i] > n) break;
    ++ans;
  }
  printf("%lld\n", ans);
  return 0;
}