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 long long N = 5e5;
bool tab[N + 1];
long long pi[N + 1];
long long hi[N + 1];
vector<long long> primes;
int main() {
  long long n;
  cin >> n;
  for (int i = 1; i <= N; i++) {
    pi[i] = i;
    hi[i] = n / i;
    tab[i] = true;
  }
  for (int i = 2; i <= N; i++) {
    if (tab[i]) {
      primes.push_back(i);
      for (int j = i * 2; j <= N; j += i) {
        tab[j] = false;
      }
    }
  }
  for (int i = 0; i < primes.size(); i++) {
    long long p = primes[i];
    for (int j = 1; j <= min(N, n / (p * p)); j++) {
      long long k = n / j / p;
      hi[j] -= (k <= N ? pi[k] : hi[j * p]) - (i + 1);
    }
    for (int j = N; j >= p * p; j--) {
      pi[j] -= pi[j / p] - (i + 1);
    }
  }
  long long ans = 0;
  for (long long p : primes) {
    if (p * p * p <= n) {
      ans++;
    }
    ans += max(0LL, hi[p] - pi[p]);
  }
  cout << ans << endl;
}