from collections import Counter

s = str(eval(input()))

cou = 0

print((s.count("+") - s.count("-")))
s = list(str(eval(input())))

cou = 0

for i in range(len(s)):

  if s[i] == "-":

    cou -= 1

  else:

    cou += 1

print(cou)
from collections import Counter

s = str(eval(input()))
cou = 0
print((s.count("+") - s.count("-")))

s = list(str(eval(input())))
cou = 0
for i in range(len(s)):
    if s[i] == "-":
        cou -= 1
    else:
        cou += 1
print(cou)

-from collections import Counter - -s = str(eval(input())) +s = list(str(eval(input()))) -print((s.count("+") - s.count("-"))) +for i in range(len(s)): +    if s[i] == "-": +        cou -= 1 +    else: +        cou += 1 +print(cou)