Problem10356--ABC326 —— B - 326-like Numbers

10356: ABC326 —— B - 326-like Numbers

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 512 MiB

Description

A 326-like number is a three-digit positive integer where the product of the hundreds and tens digits equals the ones digit.

For example, $326,400,144$ are 326-like numbers, while $623,777,429$ are not.

Given an integer $N$, find the smallest 326-like number greater than or equal to $N$. It always exists under the constraints.

Input

The input is given from Standard Input in the following format:

```
$N$
```

Output

Print the answer.

Constraints

-   $100 \leq N \leq 919$
-   $N$ is an integer.

Sample 1 Input

320

Sample 1 Output

326
320,321,322,323,324,325 are not 326-like numbers, while 326 is a 326-like number.

Sample 2 Input

144

Sample 2 Output

144
144 is a 326-like number.

Sample 3 Input

516

Sample 3 Output

600

Source/Category