Problem9818--ABC300 —— D - AABCC

9818: ABC300 —— D - AABCC

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 512 MiB

Description

How many positive integers no greater than $N$ can be represented as $a^2 \times b \times c^2$ with three primes $a,b$, and $c$ such that $a<b<c$?

Input

The input is given from Standard Input in the following format:

```
$N$
```

Output

Print the answer as an integer.

Constraints

-   $N$ is an integer satisfying $300 \le N \le 10^{12}$.

Sample 1 Input

1000

Sample 1 Output

3

The conforming integers no greater than 1000 are the following three.

  • $300=2^2×3×5^2$
  • $588=2^2×3×7^2$
  • $980=2^2×5×7^2$

Sample 2 Input

1000000000000

Sample 2 Output

2817785

Source/Category