S = eval(input())

print((S.count("+")-S.count("-")))
S = eval(input())

a = S.count("+")

b = S.count("-")

print((a-b))

S = eval(input())
print((S.count("+") - S.count("-")))

S = eval(input())
a = S.count("+")
b = S.count("-")
print((a - b))

-print((S.count("+") - S.count("-"))) +a = S.count("+") +b = S.count("-") +print((a - b))