A number is called smooth if its digits, starting from the most significant digit, form a non-decreasing sequence. Arrange all such numbers in increasing order and assign each a position. Given , output the -th smooth number.
A single integer (1 \leq n \leq 2147483647).
Print the smooth number at position .
Example 1
Example 2