eolymp
bolt
Try our new interface for solving problems
Problems

The maximum number

The maximum number

Time limit 1 second
Memory limit 64 MiB

Find the maximum positive integer that does not exceed n, the sum of which digits is maximum.

Input data

One positive integer n (1n2 147 483 647).

Output data

One number - the answer to the problem.

Examples

Input example #1
115
Output example #1
99