def isInt(s): try: int(s) except ValueError: return False else: return True S = input() sum = 0 for s in S: if(isInt(s)): sum += int(s) print(sum)