def main():

    n=eval(input())

    from collections import Counter

    c=Counter(list(n))

    print((c['1']))



if __name__=='__main__':

    main()

def main():

    s = eval(input())

    ans = 0

    for ss in s:

        if ss == "1":

            ans += 1



    print(ans)





if __name__ == '__main__':

    main()
def main():
    n = eval(input())
    from collections import Counter

    c = Counter(list(n))
    print((c["1"]))


if __name__ == "__main__":
    main()

def main():
    s = eval(input())
    ans = 0
    for ss in s:
        if ss == "1":
            ans += 1
    print(ans)


if __name__ == "__main__":
    main()

-    n = eval(input()) -    from collections import Counter - -    c = Counter(list(n)) -    print((c["1"])) +    s = eval(input()) +    ans = 0 +    for ss in s: +        if ss == "1": +            ans += 1 +    print(ans)