#  https://atcoder.jp/contests/abc081/tasks/abc081_a

stringNumbers = list(input())

count = 0
for stringNum in stringNumbers:
    if stringNum == '1':
        count+=1

print(count)

b36b6354ddf5ddad93c30ace070ea0936cfe2b9b
<mask token>

<mask token>
for stringNum in stringNumbers:
    if stringNum == '1':
        count += 1
print(count)

stringNumbers = list(input())
count = 0
for stringNum in stringNumbers:
    if stringNum == '1':
        count += 1
print(count)

#  https://atcoder.jp/contests/abc081/tasks/abc081_a

stringNumbers = list(input())

count = 0
for stringNum in stringNumbers:
    if stringNum == '1':
        count+=1

print(count)
