s=eval(input())

a=0

b=0

for i in s:

    if i=="+":

        a+=1

    if i=="-":

        b+=1

print((1*a-1*b))
s=eval(input())

print((s.count("+")-s.count("-")))
s = eval(input())
a = 0
b = 0
for i in s:
    if i == "+":
        a += 1
    if i == "-":
        b += 1
print((1 * a - 1 * b))

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

-a = 0 -b = 0 -for i in s: -    if i == "+": -        a += 1 -    if i == "-": -        b += 1 -print((1 * a - 1 * b)) +print((s.count("+") - s.count("-")))