<reponame>hytmachineworks/AtCoder
# coding = utf-8
"""
create on : 2019/04/07
project name : AtCoder
file name : 02_ABC081A

problem : https://atcoder.jp/contests/abs/tasks/abc081_a

"""


def main():
    abc = list(input())
    abc_sum = sum([int(num) for num in abc])
    print(abc_sum)


if __name__ == "__main__":
    main()

# coding = utf-8
"""
create on : 2019/04/07
project name : AtCoder
file name : 02_ABC081A

problem : https://atcoder.jp/contests/abs/tasks/abc081_a

"""


def main():
    abc = list(input())
    abc_sum = sum([int(num) for num in abc])
    print(abc_sum)


if __name__ == "__main__":
    main()
# coding = utf-8 create on : 2019/04/07 project name : AtCoder file name : 02_ABC081A  problem : https://atcoder.jp/contests/abs/tasks/abc081_a