Find the maximum positive integer that does not exceed n, the sum of which digits is maximum.
One positive integer n (1 ≤ n ≤ 2 147 483 647).
One number - the answer to the problem.