A + B#1739

A + B

2 seconds
256 megabytes
Very easy

Don't Be Complex

from a letter to i

When a well-known algebraist (hereinafter — W.K.A.) from the university's mathematics faculty was a child, his school strictly forbade taking square roots of negative numbers. Of course, W.K.A. ignored this prohibition and even (oh horror!) started using what comes out as the base of a numeral system after extracting such a root.

Recently, W.K.A. found his old notes, and among them was a suspicious identity. To check if it was true, W.K.A. needs to add two numbers and check the result. But these two numbers are written in a numeral system whose base is the square root of a negative number (specifically, ), and the answer must also be in this numeral system with base . Your task is to help W.K.A. check the identity by adding the two numbers.

It's known that imaginary numbers are numbers obtained by taking the square root of a negative number. In a system with an imaginary base, digits from to k-1, inclusive, are used. Imaginary base systems work just like ordinary ones: a number written as d_3d_2d_1d_0 is evaluated as d_3\cdot b^3 + d_2\cdot b^2 + d_1\cdot b + d_0, where is the base (in this problem, it's ). Thus, numbers of the form x + yi, where and are arbitrary integers, can be represented. For example: 1030003_{2i} = 1 \cdot (2i)^6 + 3 \cdot (2i)^4 + 3 \cdot (2i)^0 = -64 + 3 \cdot 16 + 3 = -13.

Although extracting the root of a negative number is ambiguous (both and yield when squared), the same number is always used as the base for the numeral system.

Input

The first line contains the number , the second — the number . Their lengths do not exceed . The numbers are given in a numeral system with base and contain no leading zeros; the number is represented by a single zero.

Output

The single line of the output file must contain the number A+B, written in the numeral system with base . The output should not contain leading zeros; the number should be represented by a single zero.

Examples

Example 1

Loading
Loading