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;
inline long long mod(long long n, long long m) {
  long long ret = n % m;
  if (ret < 0) ret += m;
  return ret;
}
long long gcd(long long a, long long b) {
  return (b == 0LL ? a : gcd(b, a % b));
}
long long exp(long long a, long long b, long long m) {
  if (b == 0LL) return 1LL;
  if (b == 1LL) return mod(a, m);
  long long k = mod(exp(a, b / 2, m), m);
  if (b & 1LL) {
    return mod(a * mod(k * k, m), m);
  } else
    return mod(k * k, m);
}
const int N = 2e6 + 100;
long long pref_pi[N];
const int NN = 2e5 + 100;
const int NP = 100;
long long dp[NN][NP];
vector<long long> primes;
bool isp[N];
void crivo() {
  for (int i = 2; i < N; i++) isp[i] = 1;
  for (int i = 1; i < N; i++) {
    if (isp[i]) {
      primes.push_back(i);
      for (int j = 2 * i; j < N; j += i) isp[j] = 0;
    }
    pref_pi[i] = pref_pi[i - 1] + isp[i];
  }
  for (int i = 1; i < NN; i++) {
    dp[i][0] = i;
    for (int j = 1; j < NP; j++) {
      dp[i][j] = dp[i][j - 1] - dp[i / primes[j - 1]][j - 1];
    }
  }
}
long long icbrt(long long x) {
  int l = 1, r = 1e4;
  long long ans = 1;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (mid * mid * mid <= x)
      ans = mid, l = mid + 1;
    else
      r = mid - 1;
  }
  if (ans * ans * ans < x) ans++;
  return ans;
}
long long solve(long long x, int k) {
  if (x < NN and k < NP) return dp[x][k];
  if (k == 0) return x;
  if (x < primes[k - 1] * primes[k - 1] && x < N)
    return max(1ll, pref_pi[x] - (k - 1));
  return solve(x, k - 1) - solve(x / primes[k - 1], k - 1);
}
long long pi(long long x) {
  if (x < N) return pref_pi[x];
  int k = pref_pi[icbrt(x)];
  long long res = solve(x, k) + (k - 1);
  while (primes[k] * primes[k] <= x) {
    res -= (pi(x / primes[k]) - k);
    k++;
  }
  return res;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  crivo();
  long long n;
  cin >> n;
  long long ans = 0;
  int i = 0;
  for (long long p : primes) {
    if (p > n / p) break;
    if (1LL * p * p * p <= n) ans++;
    ans += pi(n / p) - i - 1;
    i++;
  }
  cout << ans << "\n";
}