s = list(eval(input()))

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

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

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

-s = list(eval(input())) +s = eval(input())