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, pd[1000009], pri[1000009], cnt, g[2][1000009], m = 1;
struct hash {
  long long first[19260817], number;
  struct edge {
    long long to, next, id, g, delta;
    void add(long long x, long long _id, long long _g, long long _delta,
             long long fir) {
      next = fir;
      id = _id, g = _g, delta = _delta;
    }
  } e[1000009];
  edge &operator[](const long long &_x) {
    int x = _x % 19260817;
    for (long long i = first[x]; i; i = e[i].next)
      if (e[i].id == _x) return e[i];
    e[++number].add(x, _x, 0, 0, first[x]), first[x] = number;
    return e[number];
  }
} mp;
void init() {
  long long num = 0;
  for (long long i = 1; i <= n; i = (n / (n / i)) + 1)
    num++, mp[n / i].g = n / i, mp[n / i].delta = 0;
  for (long long i = 1; i <= m; i++)
    for (long long j = 1; pri[i] * pri[i] <= n / j; j = (n / (n / j)) + 1) {
      long long now = n / j / pri[i];
      mp[n / j].g -= mp[now].g - (i - 1 - mp[now].delta);
      mp[n / j].delta = i;
    }
}
long long get(long long x) { return mp[x].g - (m - mp[x].delta); }
long long work() {
  while (pri[m] * pri[m] <= n) m++;
  m--;
  long long ret = 1;
  while (pri[ret] * pri[ret] * pri[ret] <= n) ret++;
  ret--;
  init();
  for (int i = 1; pri[i] * pri[i] <= n; i++)
    ret += get(n / pri[i]) - get(pri[i]);
  return ret;
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  pd[1] = 1;
  for (int i = 2; i < 1000009; i++) {
    if (!pd[i]) pri[++cnt] = i;
    for (int j = 1; j <= cnt && pri[j] * i < 1000009; j++) {
      pd[pri[j] * i] = 1;
      if (!(i % pri[j])) break;
    }
  }
  cin >> n;
  cout << work() << endl;
  return 0;
}