z-birthday
Today is Little Z's birthday. (February 14th) but he doesn't want to say how old is he. Instead he gave you an equation, which when you solve, you get his age.
The equation consists out of integers between 1 and 1000, signs +, - (plus and minus) and parenthesis ( and ), and finally one ? which represents the unknown variable (Z's age). The question mark can be on either side of the equation
InputFrom the first line of the standard input read the equation, the equation will contain at most 1000000 characters.
OutputTo the standard output write the little Z's age
Input:
Output:
5 + ? = 32 - 2Output:
25Input:
Output:
100 - (10 + 50) = 15 + ?Output:
25Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.