beecrowd | 1199

Simple Base Conversion

By Shahriar Manzoor Bangladesh

Timelimit: 2

In this problem you are asked to write a simple base conversion program. It will be given a hexadecimal or decimal integer number as input. You have to output the corresponding decimal or hexadecimal number. Hexadecimal numbers always starts with a `0x' and all other numbers are to be considered as decimal numbers. There will be no invalid numbers in the input.

Input

The input file contains several lines of input. Each line contains a single non-negative number, which may be a decimal or hexadecimal number as explained in the problem statement. The decimal value of this number will be equal or less than 231. A line containing a negative decimal number terminates the input. This number should not be processed. Input numbers will contain no space within them.

Output

For each line of input (Except the last one) produce one line of output. This line should contain the decimal or hexadecimal representation of the corresponding hexadecimal or decimal number. Like the input, the hexadecimal numbers in the output should be preceded by a "0x".

Input Sample Output Sample

4
7
44
0x80685
-1

0x4
0x7
0x2C
525957