import collections



print((collections.Counter(eval(input()))['1']))
# import collections



# print(collections.Counter(input())['1'])



print((input().count('1')))
import collections

print((collections.Counter(eval(input()))["1"]))

# import collections
# print(collections.Counter(input())['1'])
print((input().count("1")))

-import collections - -print((collections.Counter(eval(input()))["1"])) +# import collections +# print(collections.Counter(input())['1']) +print((input().count("1")))