a = list(eval(input()))

c = 0

if a[0] == '1':

  c += 1

if a[1] == '1':

  c += 1

if a[2] == '1':

  c += 1



print(c)
li = list(eval(input()))

count = 0



for i in li:

  if i == '1':

    count += 1



print(count)
a = list(eval(input()))
c = 0
if a[0] == "1":
    c += 1
if a[1] == "1":
    c += 1
if a[2] == "1":
    c += 1
print(c)

li = list(eval(input()))
count = 0
for i in li:
    if i == "1":
        count += 1
print(count)

-a = list(eval(input())) -c = 0 -if a[0] == "1": -    c += 1 -if a[1] == "1": -    c += 1 -if a[2] == "1": -    c += 1 -print(c) +li = list(eval(input())) +count = 0 +for i in li: +    if i == "1": +        count += 1 +print(count)