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 prime[320005], ans[320005];
long long phi[10005][105];
int cnt, vis[320005];
void init() {
  cnt = 0;
  for (int i = 2; i < 320005; i++) {
    if (!vis[i]) prime[cnt++] = i;
    for (int j = 0; j <= cnt && i * prime[j] < 320005; j++) {
      vis[i * prime[j]] = 1;
      if (i % prime[j] == 0) break;
    }
    if (!vis[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 / prime[j - 1]][j - 1];
  }
}
long long solve_phi(long long m, long long n) {
  if (!n) return m;
  if (prime[n - 1] >= m) return 1;
  if (m <= 10000 && n <= 100) return phi[m][n];
  return solve_phi(m, n - 1) - solve_phi(m / prime[n - 1], n - 1);
}
long long solve(long long m) {
  if (m < (long long)320005) return ans[m];
  long long y = (long long)cbrt(m * 1.0);
  long long n = ans[y];
  long long sum = solve_phi(m, n) + n - 1;
  for (long long i = n; prime[i] * prime[i] <= m; i++)
    sum = sum - solve(m / prime[i]) + solve(prime[i]) - 1;
  return sum;
}
int main() {
  long long n;
  init();
  scanf("%I64d", &n);
  long long t = cbrt(n * 1.0);
  long long result = solve(t);
  for (int i = 0; i < cnt; i++) {
    if (prime[i] * prime[i] >= n) break;
    long long x = solve(prime[i]);
    long long y = solve(n / prime[i]);
    result += y - x;
  }
  printf("%I64d\n", result);
  return 0;
}