Let's call a number smooth if its digits form a non-decreasing sequence starting from the most significant digit. Sort these numbers in ascending order and assign a number to each. Required by number N output N-th smooth number.
N
Input The program input number N (\(1 <= N <= 2147483647\)). Imprint Print corresponding to the number N smooth number.
1000 ms 256 Mb Rules for program design and list of errors in automatic problem checking