has improved significantly in computer science. On the other hand, he hasn't improved as much in math. Especially multiplication.
He cannot understand an expression if the numbers are not in increasing order. For example, he can understand 1x4x7x9
but he cannot understand 9x4x7x1
.
Given an expression, help
understand the expression and calculate it.Input Specification
The one and only line of input will contain a string x
.
Output Specification
The first line of output should be the expression in a way that
can understand.The last line of output will be the solution to the expression.
The output will always be under
Sample Input 1
Copy
5x4x9
Sample Output 1
Copy
4x5x9
180
Comments