s = raw_input() n_s = [str(i) for i in range(10)] ans = [] for x in s: if x in n_s: ans.append(x) sum = 0 for x in ans: sum += int(x) print sum