n = eval(input())

print((sum([int(i) for i in n])))
n = eval(input())

result = 0

if n[0] == '1':

  result += 1

if n[1] == '1':

  result += 1

if n[2] == '1':

  result += 1

print(result)
n = eval(input())
print((sum([int(i) for i in n])))

n = eval(input())
result = 0
if n[0] == "1":
    result += 1
if n[1] == "1":
    result += 1
if n[2] == "1":
    result += 1
print(result)

-print((sum([int(i) for i in n]))) +result = 0 +if n[0] == "1": +    result += 1 +if n[1] == "1": +    result += 1 +if n[2] == "1": +    result += 1 +print(result)