AtCoder Beginner Contest 111
B
AtCoder Beginner Contest 111
AtCoder
⌀ 0
原题
← AC →
翻译中…

Problem Statement

翻译中…

Kurohashi has never participated in AtCoder Beginner Contest (ABC).

翻译中…

The next ABC to be held is ABC $N$ (the $N$-th ABC ever held). Kurohashi wants to make his debut in some ABC $x$ such that all the digits of $x$ in base ten are the same.

翻译中…

What is the earliest ABC where Kurohashi can make his debut?

翻译中…

Constraints

翻译中…
  • $100 \leq N \leq 999$
  • $N$ is an integer.
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

N

翻译中…

Output

翻译中…

If the earliest ABC where Kurohashi can make his debut is ABC $n$, print $n$.

翻译中…

样例

Input #1
111
Output #1
111
The next ABC to be held is ABC $111$, where Kurohashi can make his debut.
Input #2
112
Output #2
222
The next ABC to be held is ABC $112$, which means Kurohashi can no longer participate in ABC $111$. Among the ABCs where Kurohashi can make his debut, the earliest one is ABC $222$.
Input #3
750
Output #3
777
题目信息
题号
abc111_b
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。