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 = 333333;
int len = 0, vis[N];
long long p2[N];
long long ans[N];
long long phi[10005][111];
void init() {
  len = 0;
  for (int i = 2; i < N; i++) {
    if (!vis[i]) {
      for (int j = i + i; j < N; j += i) vis[j] = 1;
      p2[len++] = i;
      ans[i] = ans[i - 1] + 1;
    } else {
      ans[i] = ans[i - 1];
    }
  }
  for (int i = 0; i <= 10000; i++) {
    phi[i][0] = (long long)i;
    for (int j = 1; j <= 100; j++) {
      phi[i][j] = phi[i][j - 1] - phi[i / p2[j - 1]][j - 1];
    }
  }
}
long long get_phi(long long m, long long n) {
  if (!n) return m;
  if (p2[n - 1] >= m) return 1;
  if (m <= 10000 && n <= 100) return phi[m][n];
  return get_phi(m, n - 1) - get_phi(m / p2[n - 1], n - 1);
}
long long get_ans(long long m) {
  if (m < (long long)N) return ans[m];
  long long y = (int)cbrt(m * 1.0);
  long long n = ans[y];
  long long sum = get_phi(m, n) + n - 1;
  for (long long i = n; p2[i] * p2[i] <= m; i++) {
    sum = sum - get_ans(m / p2[i]) + get_ans(p2[i] - 1);
  }
  return sum;
}
int main() {
  long long n;
  init();
  scanf("%lld", &n);
  long long S = cbrt(n * 1.0);
  S = get_ans(S);
  long long tmp = 0;
  for (int i = 0; i < len; i++) {
    if (p2[i] * p2[i] >= n) break;
    long long x = n / p2[i];
    long long temp_s = get_ans(x);
    temp_s--;
    temp_s -= tmp;
    tmp = get_ans(p2[i]);
    S += temp_s;
  }
  printf("%lld\n", S);
  return 0;
}