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 unsigned long long LIMIT = 1e7;
int sieve[LIMIT + 5] = {0};
int pi_small[LIMIT + 5] = {0};
vector<int> p;
void prime_sieve(int n = LIMIT) {
  for (int i = 2; i <= n; i++) {
    if (!sieve[i]) {
      p.push_back(i);
      for (int j = i << 1; j <= n; j += i) {
        sieve[j] = 1;
      }
    }
  }
  for (int i = 2; i <= LIMIT; i++) {
    pi_small[i] = pi_small[i - 1] + (1 - sieve[i]);
  }
}
map<pair<unsigned long long, unsigned long long>, unsigned long long> cache1;
unordered_map<unsigned long long, int> cache2;
unsigned long long phi(unsigned long long x, int a) {
  if (a == 1) return (x + 1) / 2;
  if (cache1.count(make_pair(x, a))) return cache1[make_pair(x, a)];
  unsigned long long result = phi(x, a - 1) - phi(x / p[a - 1], a - 1);
  cache1[make_pair(x, a)] = result;
  return result;
}
unsigned long long pi(unsigned long long x) {
  if (x < LIMIT) return pi_small[x];
  if (cache2.count(x)) return cache2[x];
  int a = pi((int)sqrt(sqrt(x)));
  int b = pi((int)sqrt(x));
  int c = pi((int)cbrt(x));
  unsigned long long result =
      phi(x, a) + (unsigned long long)(b + a - 2) * (b - a + 1) / 2;
  for (int i = a + 1; i <= b; i++) {
    int w = x / p[i - 1];
    int b_i = pi((int)sqrt(w));
    result = result - pi(w);
    if (i <= c) {
      for (int j = i; j <= b_i; j++) {
        result = result - pi(w / p[j - 1]) + j - 1;
      }
    }
  }
  cache2[x] = result;
  return result;
}
int main() {
  prime_sieve();
  unsigned long long n;
  cin >> n;
  unsigned long long c = 0;
  while (c < p.size() && (unsigned long long)p[c] * p[c] <= n &&
         (unsigned long long)p[c] * p[c] * p[c] <= n)
    c++;
  for (int i = 0; (unsigned long long)p[i] * p[i] <= n; i++) {
    c += pi(n / p[i]) - pi(p[i]);
  }
  cout << c << endl;
}