s = eval(input())



a = int(s[0])

b = int(s[1])

c = int(s[2])





print((a+b+c))
s = eval(input())

result = int(s[0]) + int(s[1]) + int(s[2])

print(result)
s = eval(input())
a = int(s[0])
b = int(s[1])
c = int(s[2])
print((a + b + c))

s = eval(input())
result = int(s[0]) + int(s[1]) + int(s[2])
print(result)

-a = int(s[0]) -b = int(s[1]) -c = int(s[2]) -print((a + b + c)) +result = int(s[0]) + int(s[1]) + int(s[2]) +print(result)