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;
int ar[(1000010 >> 6) + 5] = {0};
int len = 0;
int primes[1000010];
int counter[1000010];
int phi_dp[100000][100];
int Is_Prime[1000010 + 2];
void Seive(int n) {
  Is_Prime[1] = 1;
  for (int i = 4; i <= n; i += 2) Is_Prime[i] = 1;
  int sq = sqrt(n + 1);
  for (int i = 3; i <= n; i += 2) {
    if (Is_Prime[i]) continue;
    if (i > sq) continue;
    for (int j = i * i; j <= n; j += 2 * i) Is_Prime[j] = 1;
  }
  for (int i = 1; i <= n; i++) {
    if (!Is_Prime[i]) primes[len++] = i;
    counter[i] = len;
  }
}
void init() {
  Seive(1000010 - 1);
  int k, n, res;
  for (n = 0; n < 100000; n++) phi_dp[n][0] = n;
  for (k = 1; k < 100; k++) {
    for (n = 0; n < 100000; n++) {
      phi_dp[n][k] = phi_dp[n][k - 1] - phi_dp[n / primes[k - 1]][k - 1];
    }
  }
}
long long phi(long long n, int k) {
  if (n < 100000 && k < 100) return phi_dp[n][k];
  if (k == 1) return ((++n) >> 1);
  if (primes[k - 1] >= n) return 1;
  return phi(n, k - 1) - phi(n / primes[k - 1], k - 1);
}
long long Lehmer(long long n) {
  if (n < 1000010) return counter[n];
  long long w, res = 0;
  int i, j, a, b, c, lim;
  b = sqrt(n), c = Lehmer(cbrt(n)), a = Lehmer(sqrt(b)), b = Lehmer(b);
  res = phi(n, a) + (((b + a - 2) * (b - a + 1)) >> 1);
  for (i = a; i < b; i++) {
    w = n / primes[i];
    lim = Lehmer(sqrt(w)), res -= Lehmer(w);
    if (i <= c) {
      for (j = i; j < lim; j++) {
        res += j;
        res -= Lehmer(w / primes[j]);
      }
    }
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  init();
  long long n, ans = 0, x, y;
  cin >> n;
  for (int i = 0; i < len; i++) {
    x = primes[i];
    if (x * x * x > n) break;
    ans++;
  }
  for (int i = 0; i < len; i++) {
    x = primes[i];
    if (x * x > n) break;
    y = n / x;
    ans += Lehmer(y) - Lehmer(x);
  }
  cout << ans << endl;
  return 0;
}