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 MAXN = 5000005;
bool prime[MAXN];
int prec[MAXN];
vector<int> P;
void init() {
  prime[2] = true;
  for (int i = 3; i < MAXN; i += 2) prime[i] = true;
  for (int i = 3; i * i < MAXN; i += 2) {
    if (prime[i]) {
      for (int j = i * i; j < MAXN; j += i + i) prime[j] = false;
    }
  }
  for (int i = 1; i < MAXN; i++) {
    if (prime[i]) P.push_back(i);
    prec[i] = prec[i - 1] + prime[i];
  }
}
long long rec(long long N, int K) {
  if (N <= 1 || K < 0) return 0;
  if (N <= P[K]) return N - 1;
  if (N < MAXN && 1ll * P[K] * P[K] > N) return N - 1 - prec[N] + prec[P[K]];
  const int LIM = 250;
  static int memo[LIM * LIM][LIM];
  bool ok = N < LIM * LIM;
  if (ok && memo[N][K]) return memo[N][K];
  long long ret = N / P[K] - rec(N / P[K], K - 1) + rec(N, K - 1);
  if (ok) memo[N][K] = ret;
  return ret;
}
long long count_primes(long long N) {
  if (N < MAXN) return prec[N];
  int K = prec[(int)sqrt(N) + 1];
  return N - 1 - rec(N, K) + prec[P[K]];
}
long long n;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  init();
  cin >> n;
  long long ans = 0;
  for (long long i = 2; i * i * i <= n; i++) {
    if (prime[i]) ans++;
  }
  long long f = 0;
  for (long long i = 2; i * i <= n; i++) {
    if (prime[i]) {
      f++;
      ans += count_primes(n / i);
    }
  }
  ans -= f * f;
  ans += (f * (f - 1)) / 2;
  cout << ans;
  return 0;
}