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;
using ll = long long;
using Vi = vector<int>;
using Pii = pair<int, int>;
int uplg(int n) { return 32 - __builtin_clz(n); }
int uplg(ll n) { return 64 - __builtin_clzll(n); }
void run();
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(18);
  run();
  return 0;
}
constexpr int MAX_P = 1e7;
vector<ll> pis, prl;
void initPi() {
  pis.assign(MAX_P + 1, 1);
  pis[0] = pis[1] = 0;
  for (int i = 2; i * i <= MAX_P; i++)
    if (pis[i])
      for (int j = i * i; j <= MAX_P; j += i) pis[j] = 0;
  for (int i = (1); i < (int((pis).size())); i++) {
    if (pis[i]) prl.push_back(i);
    pis[i] += pis[i - 1];
  }
}
ll partial(ll first, ll a) {
  static vector<unordered_map<ll, ll>> big;
  big.resize(int((prl).size()));
  if (!a) return (first + 1) / 2;
  if (big[a].count(first)) return big[a][first];
  ll ret = partial(first, a - 1) - partial(first / prl[a], a - 1);
  return big[a][first] = ret;
}
ll pi(ll first) {
  static unordered_map<ll, ll> big;
  if (first < int((pis).size())) return pis[first];
  if (big.count(first)) return big[first];
  ll a = 0;
  while (prl[a] * prl[a] * prl[a] * prl[a] < first) a++;
  ll ret = 0, b = --a;
  while (++b < int((prl).size()) && prl[b] * prl[b] < first) {
    ll w = first / prl[b];
    ret -= pi(w);
    for (ll j = b; prl[j] * prl[j] <= w; j++) ret -= pi(w / prl[j]) - j;
  }
  ret += partial(first, a) + (b + a - 1) * (b - a) / 2;
  return big[first] = ret;
}
void run() {
  initPi();
  ll n;
  cin >> n;
  ll ans = 0;
  for (auto& p : (prl)) {
    if (ll(p) * p * p > n) break;
    ans++;
  }
  for (int i = (0); i < (int((prl).size())); i++) {
    ll p = prl[i];
    if (p * p > n) break;
    ans += pi(n / p) - i - 1;
  }
  cout << ans << '\n';
}