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>
inline long long getint() {
  register char ch;
  while (!isdigit(ch = getchar()))
    ;
  register long long x = ch ^ '0';
  while (isdigit(ch = getchar())) x = (((x << 2) + x) << 1) + (ch ^ '0');
  return x;
}
const int LIM = 316228, P = 27294;
bool vis[LIM];
int lim, p[P], sum[LIM], last[LIM * 2], cnt;
long long n, val[LIM * 2], f[LIM * 2];
inline void sieve() {
  for (register int i = 2; i <= lim; i++) {
    if (!vis[i]) p[++p[0]] = i;
    sum[i] = sum[i - 1] + !vis[i];
    for (register int j = 1; j <= p[0] && i * p[j] <= lim; j++) {
      vis[i * p[j]] = true;
      if (i % p[j] == 0) break;
    }
  }
}
int main() {
  lim = sqrt(n = getint());
  sieve();
  for (register long long i = 1; i <= n; i = n / (n / i) + 1) {
    val[++cnt] = n / i;
  }
  std::reverse(&val[1], &val[cnt] + 1);
  std::copy(&val[1], &val[cnt + 1], &f[1]);
  for (register int i = 1; i <= p[0]; i++) {
    const int pos =
        std::lower_bound(&val[1], &val[cnt] + 1, (long long)p[i] * p[i]) - val;
    for (register int j = cnt; j >= pos; j--) {
      const long long k = val[j] / p[i], pos = k <= lim ? k : cnt + 1 - n / k;
      f[j] -= f[pos] + last[pos] - i + 1;
      last[j] = i;
    }
  }
  long long ans = 0;
  for (register int i = 1; i <= cnt; i++) {
    f[i] += last[i] - 1;
  }
  for (register int i = 1; i <= p[0]; i++) {
    ans += f[cnt + 1 - p[i]] - i;
  }
  if (n != 1)
    ans += std::upper_bound(&p[1], &p[p[0]] + 1, floor(pow(n, 1. / 3))) - &p[1];
  printf("%lld\n", ans);
  return 0;
}