You are given a sequence consisting of eight digits. Each of the digits is either 1, 2 or 3. We select four of the given eight digits, write these digits in the order they are presented in the sequence and obtain a four-digit decimal number.
Your task is to select four digits in such a way that this number is as small as possible.
The first line of input contains eight digits. Each of them is either 1, 2 or 3. There are no spaces between consecutive digits.
On the first line of output, print the four-digit decimal number obtained by the above procedure. The number must be minimal possible.