Find the maximum positive integer that does not exceed n, whose digit sum is maximum.
One positive integer n (1 \leq n \leq 2\,147\,483\,647).
One number - the answer to the problem.
Example 1