CF1183A.Nearest Interesting Number

传统题 时间 2000 ms 内存 256 MiB 3 尝试 1 已通过 1 标签

Nearest Interesting Number

Polycarp knows that if the sum of the digits of a number is divisible by 33, then the number itself is divisible by 33. He assumes that the numbers, the sum of the digits of which is divisible by 44, are also somewhat interesting. Thus, he considers a positive integer nn interesting if its sum of digits is divisible by 44.

Help Polycarp find the nearest larger or equal interesting number for the given number aa. That is, find the interesting number nn such that nan \ge a and nn is minimal.

Input

The only line in the input contains an integer aa (1a10001 \le a \le 1000).

Output

Print the nearest greater or equal interesting number for the given number aa. In other words, print the interesting number nn such that nan \ge a and nn is minimal.

Samples

432
435
99
103
237
237
42
44

在线编程 IDE

建议全屏模式获得最佳体验