Decomposition into a sum of cubes#5867

Decomposition into a sum of cubes

1 second
128 megabytes
Very easy

One positive integer is given. Represent it as the sum of the minimum number of positive cubes. Print this minimum number.

Input

One positive integer n~(1 \le n \le 10^6).

Output

Print one integer — the minimum number of positive cubes whose sum equals .

Examples

Example 1

Loading
Loading