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;
const int MX = 1005;
const int mod = 1000000007;
const long long inf = 1000000000000000069ll;
long long n, pi[320000], pini[320000];
int main() {
  cin.tie(0)->sync_with_stdio(0);
  cin >> n;
  long long ans = 0ll;
  long long sq;
  for (sq = 1ll; sq * 1ll * sq <= n; sq++) pini[sq] = n / sq - 1ll;
  for (long long i = 1ll; i <= sq; i++) pi[i] = i - 1ll;
  for (long long i = 2ll; i <= sq; i++)
    if (pi[i] != pi[i - 1]) {
      for (long long j = 1ll; j <= min(sq - 1, n / i / i); j++) {
        if (i * j < sq)
          pini[j] -= pini[i * j] - pi[i - 1];
        else
          pini[j] -= pi[n / i / j] - pi[i - 1];
      }
      for (long long j = sq; j >= i * 1ll * i; j--)
        pi[j] -= pi[j / i] - pi[i - 1];
    }
  for (long long i = 2; i < sq; i++)
    if (pi[i] != pi[i - 1]) ans += pini[i] - pi[i];
  ans += pi[(long long)(pow(n, 1.0 / 3.0) + 1e-9)];
  cout << ans << endl;
  return 0;
}