S = input() numb = [1, 2, 3, 4, 5, 6, 7, 8, 9] out = 0 for i in S: if i in list(map(str, numb)): out += int(i) print(out)