import re num = re.compile('\d') S = input() L = re.findall(pattern=num, string=S) print(sum([int(x) for x in L]))