a=int(eval(input()))

sum=0

if a//100==1:

   sum+=1

if a//10==1 or a//10==11:

    sum+=1

if a%2==1:

    sum+=1

print(sum)
a=str(eval(input()))

sum=0

if a[0]=="1":

   sum+=1

if a[1]=="1":

   sum+=1

if a[2]=="1":

   sum+=1

print(sum)
a = int(eval(input()))
sum = 0
if a // 100 == 1:
    sum += 1
if a // 10 == 1 or a // 10 == 11:
    sum += 1
if a % 2 == 1:
    sum += 1
print(sum)

a = str(eval(input()))
sum = 0
if a[0] == "1":
    sum += 1
if a[1] == "1":
    sum += 1
if a[2] == "1":
    sum += 1
print(sum)

-a = int(eval(input())) +a = str(eval(input())) -if a // 100 == 1: +if a[0] == "1": -if a // 10 == 1 or a // 10 == 11: +if a[1] == "1": -if a % 2 == 1: +if a[2] == "1":