You are writing the positive integers in increasing order, starting from 1. You have never learned the digit 0, so you skip every number that contains a 0 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 the integer n, which contains no digit 0. Find the next integer you will write.
Input
The first line contains the integer n (1≤n≤999999).
The integer n contains no digit 0.
Output
Print the next integer you will write on the first line.