s = raw_input() sum = 0 for i in range(0, len(s)): if 48 <= ord(s[i]) and ord(s[i]) <= 57: sum += int(s[i]) print sum