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;
long long n, val[640000], f[640000];
int lim, tot, cnt, p[640000], s[640000], last[640000];
bool vis[640000];
void make_prime() {
  for (int i = 2; i <= lim; i++) {
    if (!vis[i]) p[++tot] = i;
    s[i] = s[i - 1] + !vis[i];
    for (int j = 1; j <= tot && i * p[j] <= lim; j++) {
      vis[i * p[j]] = 1;
      if (i % p[j] == 0) break;
    }
  }
}
int main() {
  scanf("%lld", &n);
  lim = sqrt(n);
  make_prime();
  for (long long i = 1; i <= n; i = n / (n / i) + 1) val[++cnt] = n / i;
  reverse(val + 1, val + 1 + cnt);
  copy(val + 1, val + 1 + cnt, f + 1);
  for (int i = 1; i <= tot; i++) {
    for (int j = cnt; j; j--) {
      long long k = val[j] / p[i], pos = k <= lim ? k : cnt + 1 - n / k;
      if (k < p[i]) break;
      f[j] -= f[pos] + last[pos] - i + 1;
      last[j] = i;
    }
  }
  long long ans = 0;
  for (int i = 1; i <= cnt; i++) f[i] += last[i] - 1;
  for (int i = 1; i <= tot; i++) ans += f[cnt + 1 - p[i]] - i;
  if (n != 1)
    ans += upper_bound(p + 1, p + 1 + tot, floor(pow(n, 1 / 3.0))) - p - 1;
  printf("%lld\n", ans);
  return 0;
}