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;
const int N = 500005;
ll n;
ll phi[10005][105];
int ptr, pr[N], pi[N];
bool npr[N];
ll calc_phi(ll a, ll b) {
  if (!b) return a;
  if (pr[b] >= a) return 1;
  if (a <= 10000 && b <= 100) return phi[a][b];
  return calc_phi(a, b - 1) - calc_phi(a / pr[b], b - 1);
}
ll calc_pi(ll x) {
  if (x < N) return pi[x];
  int y = int(cbrt(x)) + 1, n = pi[y];
  ll ret = calc_phi(x, n) + n - 1;
  for (int i = n + 1; pr[i] * 1ll * pr[i] <= x; i++)
    ret -= calc_pi(x / pr[i]) - calc_pi(pr[i]) + 1;
  return ret;
}
int main() {
  ios::sync_with_stdio(false);
  for (int i = 2; i < N; i++) {
    pi[i] = pi[i - 1];
    if (!npr[i]) pr[++ptr] = i, ++pi[i];
    for (int j = 1; j <= ptr && i * pr[j] < N; j++) {
      npr[i * pr[j]] = 1;
      if (i % pr[j] == 0) break;
    }
  }
  for (int i = 1; i <= 10000; i++) {
    phi[i][0] = i;
    for (int j = 1; j <= 100; j++)
      phi[i][j] = phi[i][j - 1] - phi[i / pr[j]][j - 1];
  }
  cin >> n;
  ll ans = calc_pi(cbrt(n));
  for (int i = 1; i <= ptr && pr[i] * 1ll * pr[i] < n; i++)
    ans += calc_pi(n / pr[i]) - calc_pi(pr[i]);
  cout << ans << endl;
  return 0;
}