a=eval(input())

ans=0

for i in a:

    if i=='+':

        ans+=1

    else:

        ans=ans-1

print(ans)

a=(eval(input()))

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

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

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