S = input() fig = [] for s in S: if s.isdigit(): fig.append(int(s)) if len(fig) == 0: print(0) else: print(sum(fig))