#abc234e. [abc234_e]Arithmetic Number
[abc234_e]Arithmetic Number
Problem Statement
Let us call a positive integer that satisfies the following condition an arithmetic number.
- Let be the -th digit of from the top (when is written in base without unnecessary leading zeros.) Then, holds, where is the number of digits in .
- This condition can be rephrased into the sequence being arithmetic.
- If is a -digit integer, it is assumed to be an arithmetic number.
For example, are arithmetic numbers, while are not.
Find the smallest arithmetic number not less than .
Constraints
- is an integer between and (inclusive).
Input
Input is given from Standard Input in the following format:
Output
Print the answer as an integer.
Sample Input 1
152
Sample Output 1
159
The smallest arithmetic number not less than is .
Sample Input 2
88
Sample Output 2
88
itself may be an arithmetic number.
Sample Input 3
8989898989
Sample Output 3
9876543210