Sum of cubes#8354

Sum of cubes

1 second
128 megabytes
Medium

Write a program that finds the minimal positive integer with a given sum of cubes of digits.

Input

One number — the required sum of cubes of digits (1 \le n \le 8000).

Output

Print one number — the answer to the problem.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading