S = str(input()) S_box = [] for i in range(len(S)): S_box.append(S[i:i+1]) num_box = [] for i in range(len(S_box)): try: num_box.append(int(S_box[i])) except: continue total_num = 0 for i in num_box: total_num += i print(total_num)