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 N = 700005;
int m, p[N], s[N], l[N];
bool used[N];
long long n, ans, a[N], f[N];
int main() {
  scanf("%lld", &n), m = sqrt(n);
  for (int i = 2; i <= m; i++) {
    s[i] = s[i - 1];
    if (!used[i]) p[++p[0]] = i, s[i]++;
    for (int j = 1, x = i << 1; j <= p[0] && x <= m; j++, x = i * p[j]) {
      used[x] = 1;
      if (!(i % p[j])) break;
    }
  }
  for (long long i = n; i; i = n / (n / i + 1))
    a[0]++, f[a[0]] = a[a[0]] = n / i;
  for (int i = 1; i <= p[0]; i++)
    for (int j = a[0]; j; j--) {
      long long k = a[j] / p[i];
      if (k < p[i]) break;
      k = k < m ? k : a[0] - n / k + 1, f[j] -= f[k] - i + l[k] + 1, l[j] = i;
    }
  for (int i = 1; i <= p[0]; i++) {
    int x = a[0] - p[i] + 1;
    ans += f[x] + l[x] - i - 1;
  }
  printf("%lld", ans + s[(int)cbrt(n)]);
  return 0;
}