s=eval(input())

print((s.count('1')))
a=list(map(int,list(eval(input()))))

b=0

for i in a:

  if i==1:

    b+=1

  else:

    pass

print(b)
s = eval(input())
print((s.count("1")))

a = list(map(int, list(eval(input()))))
b = 0
for i in a:
    if i == 1:
        b += 1
    else:
        pass
print(b)

-s = eval(input()) -print((s.count("1"))) +a = list(map(int, list(eval(input())))) +b = 0 +for i in a: +    if i == 1: +        b += 1 +    else: +        pass +print(b)