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;
long long n;
bool flag[10000010];
int sump[10000010], phi[100010][110];
vector<int> prime;
void init() {
  flag[1] = 1;
  for (int i = 2; i <= 10000000; i++) {
    if (!flag[i]) prime.push_back(i);
    for (int j = 0; j < prime.size() && i * prime[j] <= 10000000; j++) {
      flag[i * prime[j]] = 1;
      if ((i % prime[j]) == 0) break;
    }
  }
  for (int i = 1; i <= 10000000; i++) sump[i] = sump[i - 1] + !flag[i];
  for (int i = 0; i <= 100000; i++) phi[i][0] = i;
  for (int i = 0; i <= 100000; i++) {
    for (int j = 1; j <= 100; j++) {
      phi[i][j] = phi[i][j - 1] - phi[i / prime[j - 1]][j - 1];
    }
  }
}
unordered_map<long long, long long> mp;
inline long long PHI(long long m, int n) {
  if (n == 0) return m;
  if (prime[n - 1] >= m) return 1;
  if (m <= 100000 && n <= 100) return phi[m][n];
  return PHI(m, n - 1) - PHI(m / prime[n - 1], n - 1);
}
inline long long S(long long x) {
  if (x <= 10000000) return sump[x];
  if (mp.find(x) != mp.end()) return mp[x];
  int y, c;
  y = c = cbrt(0.9 + x);
  int s = sqrt(x + 0.9), a = sump[y];
  long long ret = PHI(x, a) + a - 1;
  for (int i = a; prime[i] <= s; i++)
    ret = ret - S(x / prime[i]) + S(prime[i]) - 1;
  return mp[x] = ret;
}
int main() {
  scanf("%lld", &n);
  init();
  long long ans = sump[(int)pow(n, 1.0 / 3)];
  for (int i = 0; 1ll * prime[i] * prime[i] < n; i++)
    ans += S(n / prime[i]) - S(prime[i]);
  printf("%lld\n", ans);
  return 0;
}