G. Removing Parentheses
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

A valid arithmetic expression is given, which can contain only integers in the range from 0 to 9, parentheses, and the binary operators '+' and '-'.

Remove zero or more parentheses so that the expression remains valid and its value is maximized.

Input

A single line of input contains a valid expression in the format described above, containing no more than 100 numbers and no more than 100 parentheses.

Output

In the first line of output, print the maximum value of the expression. In the second line, print the expression after removing the parentheses that yields this value.

Examples
Input
1+(2)-(3-(4-5))
Output
9
1+(2)-(3-4-5)
Input
1-(2-3)
Output
2
1-(2-3)