s = input() ans = [] for i in s: if i.isdigit(): ans.append(int(i)) print(sum(ans)) if sum(ans) > 0 else print(0)