from operator import add from functools import reduce def isNum(s): Num = [str(i) for i in range(10)] return True if s in Num else False S = list(input()) S = filter(isNum, S) S += '0' print(reduce(add, list(map(int, S))))