import re S = input() pattern = re.compile(r'[1-9]{1}') if pattern: print(sum(map(int, pattern.findall(S)))) else: print(0)