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>
int64_t small[317000], big[317000];
int main() {
  int64_t N;
  scanf("%I64d", &N);
  int64_t root = 0;
  while (root * root <= N) root++;
  for (int64_t i = 1; i < root; i++) {
    small[i] = i - 1;
    big[i] = N / i - 1;
  }
  for (int64_t p = 2; p < root; p++) {
    if (small[p] == small[p - 1]) continue;
    for (int64_t i = 1; i < std::min(root, N / p / p + 1); i++) {
      big[i] = big[i] - ((i * p < root) ? big[i * p] : small[N / i / p]) +
               small[p - 1];
    }
    for (int64_t i = root - 1; i >= p * p; i--) {
      small[i] = small[i] - small[i / p] + small[p - 1];
    }
  }
  int64_t cuberoot = 1;
  while (cuberoot * cuberoot * cuberoot <= N) cuberoot++;
  int64_t ans = small[cuberoot - 1];
  for (int64_t p = 2; p * p < N; p++) {
    if (small[p] == small[p - 1]) continue;
    ans += big[p] - small[p];
  }
  printf("%I64d\n", ans);
  return 0;
}