s = eval(input())

p = s.count("+")

print((2 * p - 4))
s = eval(input())

n = 0

ans = 0

for o in s:

    if o == '+':

        ans += 1

    else:

        ans -= 1

print(ans)
s = eval(input())
p = s.count("+")
print((2 * p - 4))

s = eval(input())
n = 0
ans = 0
for o in s:
    if o == "+":
        ans += 1
    else:
        ans -= 1
print(ans)

-p = s.count("+") -print((2 * p - 4)) +n = 0 +ans = 0 +for o in s: +    if o == "+": +        ans += 1 +    else: +        ans -= 1 +print(ans)