A + B
Not a set of
from a letter to the i
When a famous algebraist (hereinafter - O.I.A.) with fur-mate was a kid, he was at school was strictly forbidden to take the square roots of negative numbers. Of course, O.I.A. ban on spat and even (oh, horror!) began to use what you get after taking a root, as the radix.
Recently O.I.A. found my old records, and in them some sort of suspicious identity. To check it spravdelivost, O.I.A. enough to add two numbers and see the result. Unfortunately, these two numbers are written just as a number system with base equal to the square root of negative numbers (specifically, ), and the answer must also be represented in the radix . Your task - to help O.I.A. verify identity, adding two numbers.
As you know, imaginary numbers - these are the numbers that are the result of taking the square root of negative numbers. In a system with an imaginary base in the numbers using the numbers from 0 to k-1, inclusive. Imaginary radix behave exactly the same as usual, that is, the number written as d_3d_2d_1d_0, is given by d_3·b^3+d_2·b^2+d_1·b+d_0, where b - the radix (in this problem, it is equal ). Thus, the number may be obtained form x+y, where x and y - are any integers. For example: 1030003_=1·()^6+3·()^4+3·()^0=-64+3·16+3=-13.
Despite the fact that the operation of taking roots of negative numbers is ambiguous (as , and - make a square -4), as the radix is always taken the same number.
Input
The first line number is set to A, the second - the number of B. Their length does not exceed 1000000. The numbers given in the radix and does not contain leading zeros, the number of 0 represents a zero.
Output
The only line of output file to be printed the number of A+B, written in radix . The displayed number should not contain leading zeros, the number 0 shall be indicated by one zero.