#abc234e. [abc234_e]Arithmetic Number

[abc234_e]Arithmetic Number

Problem Statement

Let us call a positive integer nn that satisfies the following condition an arithmetic number.

  • Let did_i be the ii-th digit of nn from the top (when nn is written in base 1010 without unnecessary leading zeros.) Then, (d2d1)=(d3d2)=dots=(dkdk1)(d_2-d_1)=(d_3-d_2)=\\dots=(d_k-d_{k-1}) holds, where kk is the number of digits in nn.
    • This condition can be rephrased into the sequence (d1,d2,dots,dk)(d_1,d_2,\\dots,d_k) being arithmetic.
    • If nn is a 11-digit integer, it is assumed to be an arithmetic number.

For example, 234,369,86420,17,95,8,11,777234,369,86420,17,95,8,11,777 are arithmetic numbers, while 751,919,2022,246810,2356751,919,2022,246810,2356 are not.

Find the smallest arithmetic number not less than XX.

Constraints

  • XX is an integer between 11 and 101710^{17} (inclusive).

Input

Input is given from Standard Input in the following format:

XX

Output

Print the answer as an integer.


Sample Input 1

152

Sample Output 1

159

The smallest arithmetic number not less than 152152 is 159159.


Sample Input 2

88

Sample Output 2

88

XX itself may be an arithmetic number.


Sample Input 3

8989898989

Sample Output 3

9876543210