s = raw_input() t = 0 for c in s: if ord('0') <= ord(c) and ord(c) <= ord('9'): t += ord(c) - ord('0') print t