s = list(eval(input()))

ans = 0

for i in s:

    if i == "+":

        ans += 1

    else:

        ans -= 1

print(ans)
s = list(eval(input()))

print((s.count("+") - s.count("-")))
s = list(eval(input()))
ans = 0
for i in s:
    if i == "+":
        ans += 1
    else:
        ans -= 1
print(ans)

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

-ans = 0 -for i in s: -    if i == "+": -        ans += 1 -    else: -        ans -= 1 -print(ans) +print((s.count("+") - s.count("-")))