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 prime[2010100], flag[2010100], np, pi[2010100];
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 < 2010100; i++) {
    if (!flag[i]) prime[++np] = i, flag[i] = i;
    pi[i] = np;
    for (int j = 1; j <= np && prime[j] * i < 2010100; 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;
  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] - (long long)pp[j / prime[i]][i - 1] * prime[i]);
      phi[j][i] = phi[j][i - 1] - phi[j / prime[i]][i - 1];
    }
  }
}
int sqrt2(long long x) {
  long long res = sqrt(x) - 1e-7;
  while (res * res <= x) res++;
  return res - 1;
}
int sqrt3(long long x) {
  long long res = cbrt(x) - 1e-7;
  while (res * res * res <= x) res++;
  return res - 1;
}
long long getphi(long long n, int s) {
  if (s == 0) 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 < 2010100 && 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 < 2010100) 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() {
  prepare();
  long long n, ans = 0;
  cin >> n;
  for (int i = 1; i <= np; i++) {
    long long val = 1LL * prime[i] * prime[i] * prime[i];
    if (val > n) break;
    ans++;
  }
  for (int i = 1; i <= np; i++) {
    if (1LL * prime[i] * prime[i] > n) break;
    long long L = prime[i] + 1;
    long long R = n / prime[i];
    ans += getpi(R) - getpi(L - 1);
  }
  cout << ans << endl;
  return 0;
}