import re from functools import reduce line = input() chars = list(line) digits = filter(lambda c: re.match(r'\d', c), chars) sum = reduce(lambda a, b: a + b, map(int, digits), 0) print(sum)