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 maxn = 650000;
int ptt, pri[maxn];
void sieve() {
  int N = sqrt(1e11) + 1;
  for (int i = (2), iend = (N); i <= iend; ++i) {
    if (!pri[i]) pri[++ptt] = i;
    for (int j = (1), jend = (ptt); j <= jend; ++j) {
      if (i * pri[j] > N) break;
      pri[i * pri[j]] = 1;
      if (i % pri[j] == 0) break;
    }
  }
}
long long n, ans, dp[maxn], vmp[maxn];
int sqrt_n, vtt, itt, id1[maxn], id2[maxn];
long long& getdp(long long x) { return dp[x <= sqrt_n ? id1[x] : id2[n / x]]; }
signed main() {
  sieve();
  cin >> n, sqrt_n = sqrt(n);
  for (int i = (1), iend = (ptt); i <= iend; ++i)
    ans += 1ll * pri[i] * pri[i] * pri[i] <= n;
  for (long long l = 1; l <= n; l = n / (n / l) + 1) {
    long long x = n / l;
    x <= sqrt_n ? id1[x] = ++itt : id2[n / x] = ++itt, vmp[++vtt] = n / l;
  }
  for (int i = (1), iend = (vtt); i <= iend; ++i) getdp(vmp[i]) = vmp[i] - 1;
  for (int i = (1), iend = (ptt); i <= iend; ++i) {
    for (int j = (1), jend = (vtt); j <= jend; ++j) {
      if (vmp[j] < 1ll * pri[i] * pri[i]) break;
      getdp(vmp[j]) += i - 1 - getdp(vmp[j] / pri[i]);
    }
  }
  for (int i = (1), iend = (ptt); i <= iend; ++i)
    if (pri[i] < sqrt_n) ans += getdp(n / pri[i]) - i;
  cout << ans << endl;
  return 0;
}