시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 512 MB 67 51 48 84.211%

문제

You’re writing the positive integers in increasing order starting from one. But you’ve never learned the digit zero, and thus omit any number that contains a zero in any position. The first ten integers you write are: 1, 2, 3, 4, 5, 6, 7, 8, 9, and 11.

You have just written down the integer n (which is guaranteed to not contain the digit zero). What will be the next integer that you write down?

입력

The input consists of a single line containing the integer n (1 ≤ n ≤ 999,999).

It is guaranteed that n does not contain the digit zero.

출력

Print, on a single line, the next integer you will be writing down.

예제 입력 1

99

예제 출력 1

111

예제 입력 2

1234

예제 출력 2

1235