# 数字を全て足そう(数字だけ) def main(): S = list(input().strip()) ans = 0 for s in S: ans += int(s) print(ans) if __name__ == "__main__": main()