import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines S = read().rstrip() S = [x - ord('0') for x in S] answer = sum(x for x in S if 0 <= x <= 9) print(answer)