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;
int cnt[22000000], pri[22000000 / 12], tot;
int f[105][300005];
bool fl[22000000];
void init() {
  fl[1] = 1;
  cnt[1] = 0;
  for (int i = 2; i < 22000000; i++) {
    cnt[i] = cnt[i - 1];
    if (!fl[i]) {
      pri[++tot] = i;
      cnt[i]++;
    }
    for (int j = 1; i * pri[j] < 22000000 && j <= tot; j++) {
      fl[i * pri[j]] = 1;
      if (i % pri[j] == 0) break;
    }
  }
  for (int i = 1; i <= 300000; i++) f[0][i] = i;
  for (int i = 1; i < 105; i++)
    for (int j = 1; j <= 300000; j++)
      f[i][j] = f[i - 1][j] - f[i - 1][j / pri[i]];
}
map<long long, long long> mp;
int times = 0;
long long dp(long long x, int y) {
  if (x <= 300000 && y <= 103) return f[y][x];
  if (1ll * pri[y] * pri[y] >= x) return max(0, cnt[x] - y + 1);
  if (!y) return x;
  long long hsh = x * 1000 + y;
  if (mp.find(hsh) != mp.end()) return mp[hsh];
  return mp[hsh] = dp(x, y - 1) - dp(x / pri[y], y - 1);
}
long long calcpri(long long lim) {
  if (lim < 22000000) return (long long)cnt[lim];
  long long tmp = 1;
  for (; 1ll * pri[tmp] * pri[tmp] * pri[tmp] <= lim; tmp++)
    ;
  tmp--;
  long long ans = dp(lim, tmp) + tmp - 1;
  for (int id = tmp + 1; 1ll * pri[id] * pri[id] <= lim; id++)
    ans -= cnt[lim / pri[id]] - id + 1;
  return ans;
}
long long n;
int main() {
  init();
  scanf("%I64d", &n);
  long long ans = 0;
  for (int i = 1; 1ll * pri[i] * pri[i] * pri[i] <= n; i++) ans++;
  for (int i = 1; 1ll * pri[i] * pri[i] <= n; i++)
    ans += calcpri(n / pri[i]) - i;
  printf("%lld", ans);
}