# coding=utf-8: import re s = str(input()) n = 0 string = re.sub(r'[a-zA-Z]+', '0', s) for i in string: n += int(i) print(n)