def is_int(x): try: int(x) except ValueError: return False else: return True S = input() S_list = list(S) S_length = len(S_list) solution = int(0) for i in range(S_length): if is_int(S_list[i]) == True: solution = solution + int(S_list[i]) print(solution)