加加減減


Submit solution


Points: 100 (partial)
Time limit: 2.0s
Memory limit: 64M

Author:
Problem types

給一個只有數字,\(+\) 和 \(-\) 和 \(=\) 的運算式,問答案是多少。


Input

輸入只有一行,包含一個運算式,一定會以 \(=\) 結尾,行末會換行。

Output

輸出一個整數代表運算式的答案。

Constraints

第 \(1\) 組測資沒有任何 \(+\) 和 \(-\)。

第 \(2\) 組測資只有一個 \(+\) 或 \(-\)。

前 \(3\) 組測資的數字都是個位數。

第 \(4\) 組測資沒有 \(-\)。

所有測資有數字不超過 \(1000\),字串長度也不超過 \(1000\)。

Sample Input
8+9+17-0+101-48=
Sample Output
87

Comments

There are no comments at the moment.