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 f[404040];
int a[404040], nn;
int prime[505050], flag[505050], np, pi[505050];
const int MM = 7;
const int PM = 2 * 3 * 5 * 7 * 11 * 13 * 17;
int phi[PM + 1][MM + 1], sz[MM + 1];
int pp[PM + 1][MM + 1];
void prepare() {
  for (int i = 2; i < 505050; i++) {
    if (!flag[i]) prime[++np] = i, flag[i] = i;
    pi[i] = np;
    for (int j = 1; j <= np && prime[j] * i < 505050; j++) {
      flag[i * prime[j]] = prime[j];
      if (flag[i] == prime[j]) break;
    }
  }
  sz[0] = 1;
  for (int i = 1; i <= PM; i++)
    pp[i][0] = (long long)i * (i + 1) / 2 % 1000000009;
  for (int i = 1; i <= PM; i++) phi[i][0] = i;
  for (int i = 1; i <= MM; i++) {
    sz[i] = sz[i - 1] * prime[i];
    for (int j = 1; j <= PM; j++) {
      pp[j][i] = (pp[j][i - 1] + 1000000009 -
                  (long long)pp[j / prime[i]][i - 1] * prime[i] % 1000000009) %
                 1000000009;
      phi[j][i] = phi[j][i - 1] - phi[j / prime[i]][i - 1];
    }
  }
}
int sqrt2(long long first) {
  long long res = sqrt(first) - 1e-7;
  while (res * res <= first) res++;
  return res - 1;
}
int sqrt3(long long first) {
  long long res = cbrt(first) - 1e-7;
  while (res * res * res <= first) res++;
  return res - 1;
}
long long getphi(long long n, int s) {
  if (!s) return n;
  if (s <= MM) return phi[n % sz[s]][s] + (n / sz[s]) * phi[sz[s]][s];
  if (n <= prime[s] * prime[s]) return pi[n] - s + 1;
  if (n < 505050 && n <= (long long)prime[s] * prime[s] * prime[s]) {
    int sx = pi[sqrt2(n)];
    long long ans = pi[n] - s + 1;
    for (int i = s + 1; i <= sx; i++) ans += pi[n / prime[i]] - i + 1;
    return ans;
  }
  return getphi(n, s - 1) - getphi(n / prime[s], s - 1);
}
long long getpi(long long n) {
  if (n < 505050) return pi[n];
  int s3 = pi[sqrt3(n)], ed = pi[sqrt2(n)];
  long long ans = getphi(n, s3) + s3 - 1;
  for (int i = s3 + 1; i <= ed; i++) ans -= getpi(n / prime[i]) - i + 1;
  return ans;
}
int main() {
  for (int i = 2; i < 404040; i++)
    if (!f[i]) {
      a[nn++] = i;
      if ((long long)i * i >= 404040) continue;
      for (int j = i * i; j < 404040; j += i) f[j] = 1;
    }
  prepare();
  long long N, ans = 0;
  cin >> N;
  for (int i = nn; i--;)
    if ((long long)a[i] * a[i] * a[i] <= N) ans++;
  for (int i = 0; i + 1 < nn && a[i] <= N; i++) {
    long long st = a[i] + 1, ed = N + 1;
    while (st + 1 < ed) {
      long long md = st + ed >> 1;
      if (md * a[i] <= N)
        st = md;
      else
        ed = md;
    }
    if ((long long)st * a[i] <= N) ans += getpi(st) - i - 1;
  }
  cout << ans;
}