w = input() num = ["1","2","3","4","5","6","7","8","9"] res = 0 for i in range(len(w)): if w[i] in num: res += int(w[i]) print(res)