The maximum number#7358

The maximum number

1 second
64 megabytes
Medium

Find the maximum positive integer that does not exceed , whose digit sum is maximum.

Input

One positive integer (1 \leq n \leq 2\,147\,483\,647).

Output

One number - the answer to the problem.

Examples

Example 1

Loading
Loading