s = str(eval(input()))

s = list(s)

cnt = 0

for i in s:

    if i == "+":

        cnt += 1

    else:

        cnt -= 1

print(cnt)
s = eval(input())

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

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

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