S = list(input()) num = [str(x) for x in range(1, 10)] total = 0 for t in S: if t in num: total += int(t) print(total)