import sys def resolve(in_): ans = sum(map(int, tuple(next(in_).strip()))) return ans def main(): answer = resolve(sys.stdin) print(answer) if __name__ == '__main__': main()