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 MAX = 1e6 + 6;
bool prime[MAX];
int prec[MAX];
vector<int> P;
long long rec(long long N, int K) {
  if (N <= 1 || K < 0) return 0;
  if (N <= P[K]) return N - 1;
  if (N < MAX && 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 && K < 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 < MAX) return prec[N];
  int K = prec[(int)sqrt(N) + 1];
  return N - 1 - rec(N, K) + prec[P[K]];
}
void init_count_primes() {
  prime[2] = true;
  for (int i = 3; i < MAX; i += 2) prime[i] = true;
  for (int i = 3; i * i < MAX; i += 2)
    if (prime[i])
      for (int j = i * i; j < MAX; j += i + i) prime[j] = false;
  for (int i = 0; i < MAX; i++)
    if (prime[i]) P.push_back(i);
  for (int i = 1; i < MAX; i++) prec[i] = prec[i - 1] + prime[i];
}
int main() {
  init_count_primes();
  long long n;
  cin >> n;
  long long ans = 0;
  for (int i = 0; i < P.size(); i++) {
    if (1LL * P[i] * P[i] * P[i] <= n)
      ans++;
    else
      break;
  }
  for (int i = 0; i < P.size(); i++) {
    if (n / P[i] >= P[i])
      ans += count_primes(n / P[i]) - count_primes(P[i]);
    else
      break;
  }
  cout << ans << endl;
}