Problems
Decomposition into a sum of cubes
Decomposition into a sum of cubes
Given a positive integer n, decompose it to the sum of minimum number of positive perfect cubes. The program should print this minimum quantity.
Input
One single positive integer n (1 ≤ n ≤ 106
).
Output
Print one positive integer - the minimum quantity of cubes.
Input example #1
33
Output example #1
5
Example description: 33=2^3+2^3+2^3+2^3+1^3, and 33 cannot be decomposed into a sum of less than five positive cubes.