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;
long long n, lim, top;
const long long maxn = 2 * 1e6 + 5, maxnn = 1e6 + 5;
bool isprime[maxnn], flag;
long long g[maxn], h[maxn], primes[maxnn];
void sieve() {
  memset(isprime, true, sizeof(isprime));
  for (long long i = 2; i <= lim; i++) {
    if (isprime[i]) {
      for (long long j = (i << 1); j <= lim; j += i) {
        isprime[j] = false;
      }
    }
  }
  for (long long i = 2; i <= lim; i++) {
    if (isprime[i]) {
      primes[++top] = i;
    }
  }
}
long long sz(long long x) {
  if (flag) {
    if (x >= lim) {
      return n / x;
    }
    return (lim << 1) - x;
  }
  if (x > lim) {
    return n / x;
  }
  return (lim << 1) + 1 - x;
}
void init() {
  lim = sqrt(1.0 * n);
  sieve();
  for (long long i = 1; i <= lim; i++) {
    h[i] = n / i;
    g[i] = n / i - 1;
  }
  if (lim * lim < n) {
    for (long long i = lim + 1; i <= (lim << 1); i++) {
      h[i] = (lim << 1) + 1 - i;
      g[i] = (lim << 1) - i;
    }
  } else {
    for (long long i = lim + 1; i <= (lim << 1) - 1; i++) {
      h[i] = (lim << 1) - i;
      g[i] = (lim << 1) - i - 1;
    }
    flag = true;
  }
}
long long solve() {
  init();
  for (long long i = 1; i <= top; i++) {
    for (long long j = 1; h[j] >= primes[i] * primes[i]; j++) {
      int t = sz(h[j] / primes[i]);
      g[j] -= g[t] - (i - 1);
    }
  }
  return g[1];
}
int main() {
  long long ans = 0;
  scanf("%lld", &n);
  if (n == 1) {
    printf("0\n");
    return 0;
  }
  solve();
  for (int i = 1; i <= top; ++i) {
    ans += g[primes[i]];
  }
  ans -= top + top * (top - 1) / 2;
  for (long long i = 1, j = primes[i]; j * j * j <= n;) {
    ++ans;
    ++i;
    j = primes[i];
  }
  printf("%lld\n", ans);
  return 0;
}