import sys input=sys.stdin.readline S = input() print(sum(list(map(int, str(S)))))