Sum of cubes#5208

Sum of cubes

1 second
122.174 megabytes
Medium

Write a program to find the minimal positive integer with the given sum of cubes of digits.

Input

One integer - the sum of cubes of digits (1 \le n \le 8000).

Output

Print the minimal positive integer with the given sum of cubes of digits.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading