a = eval(input())

c = 0

for i in a:

  if i =="+":c += 1

  else: c -=1

print(c)
s = eval(input())

ans = 0

for i in range(4):

    if s[i]=="+":

        ans += 1

    else:

        ans -= 1

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

s = eval(input())
ans = 0
for i in range(4):
    if s[i] == "+":
        ans += 1
    else:
        ans -= 1
print(ans)

-a = eval(input()) -c = 0 -for i in a: -    if i == "+": -        c += 1 +s = eval(input()) +ans = 0 +for i in range(4): +    if s[i] == "+": +        ans += 1 -        c -= 1 -print(c) +        ans -= 1 +print(ans)