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;
const int maxn = 1e6 + 5;
long long f[maxn], g[maxn];
bool isprime[maxn];
int prime[maxn];
int tot = 0;
void init() {
  for (int i = 2; i < maxn; i++) isprime[i] = true;
  for (int i = 2; i < maxn; i++) {
    if (isprime[i]) prime[tot++] = i;
    for (int j = 0; j < tot && i * prime[j] < maxn; j++) {
      isprime[i * prime[j]] = false;
      if (i % prime[j] == 0) break;
    }
  }
}
long long solve(long long n) {
  long long i, j, m;
  for (m = 1; m * m <= n; m++) f[m] = n / m - 1;
  for (i = 1; i <= m; i++) g[i] = i - 1;
  for (i = 2; i <= m; i++) {
    if (g[i] == g[i - 1]) continue;
    for (j = 1; j <= min(m - 1, n / i / i); j++) {
      if (i * j < m)
        f[j] -= f[i * j] - g[i - 1];
      else
        f[j] -= g[n / i / j] - g[i - 1];
    }
    for (j = m; j >= i * i; j--) g[j] -= g[j / i] - g[i - 1];
  }
  long long ans = 0;
  for (int i = 2; i < m; i++) {
    if (g[i] == g[i - 1]) continue;
    ans += f[i] - g[i];
  }
  return ans;
}
int main(void) {
  init();
  long long n;
  scanf("%lld", &n);
  long long ans = 0;
  for (int i = 0; i < tot; i++) {
    if (prime[i] * 1LL * prime[i] * prime[i] > n) break;
    ans++;
  }
  printf("%lld", ans + solve(n));
  return 0;
}