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;
vector<int> isp(10100100);
vector<long long> primes, acum_pi(10100100);
int phi_table[300000][100];
unordered_map<long long, long long> dp;
void super_sieve_3000_ultron_beta() {
  for (int i = 2; i < 10100100; i++) isp[i] = 1;
  for (int i = 2; i < 10100100; i++) {
    if (isp[i]) {
      primes.push_back(i);
      for (int j = 2 * i; j < 10100100; j += i) isp[j] = 0;
    }
    acum_pi[i] = acum_pi[i - 1] + isp[i];
  }
  for (int i = 0; i < 300000; i++) {
    phi_table[i][0] = i;
    for (int k = 1; k < 100; k++) {
      phi_table[i][k] =
          phi_table[i][k - 1] - phi_table[i / primes[k - 1]][k - 1];
    }
  }
}
long long pi_(long long x);
long long solve(long long n, long long k) {
  if (n < 300000 && k < 100) return phi_table[n][k];
  if (k == 0) return n;
  if (k > primes.size()) return pi_(n) - k + 1;
  if (primes[k - 1] > n) return 1;
  if (n < primes[k - 1] * primes[k - 1]) return pi_(n) - k + 1;
  return solve(n, k - 1) - solve(n / primes[k - 1], k - 1);
}
long long pi_(long long x) {
  if (x < 10100100) return acum_pi[x];
  if (dp.count(x)) return dp[x];
  long long cubic_root = ceil(pow(x, 1. / 3));
  long long k = acum_pi[cubic_root];
  long long ret = solve(x, k) + k - 1;
  while (primes[k] * primes[k] <= x) {
    ret = ret - pi_(x / primes[k]) + k;
    k++;
  }
  return dp[x] = ret;
}
long long n, ans;
int main() {
  super_sieve_3000_ultron_beta();
  scanf("%lld", &n);
  for (int i = 0; i < primes.size(); i++) {
    long long pi = primes[i];
    if (pi >= n / pi) break;
    if (pi * pi * pi <= n) ans++;
    ans += pi_(n / pi) - i - 1;
  }
  printf("%lld\n", ans);
  return 0;
}