Score : 100 points
There is always an integer in Takahashi's mind.
Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is +
or -
. When he eats +
, the integer in his mind increases by 1; when he eats -
, the integer in his mind decreases by 1.
The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat.
Find the integer in Takahashi's mind after he eats all the symbols.
+
or -
.Input is given from Standard Input in the following format:
S
Print the integer in Takahashi's mind after he eats all the symbols.
+-++
2
+
. After eating it, the integer in his mind becomes 1.-
. After eating it, the integer in his mind becomes 0.+
. After eating it, the integer in his mind becomes 1.+
. After eating it, the integer in his mind becomes 2.Thus, the integer in Takahashi's mind after he eats all the symbols is 2.
-+--
-2
----
-4