w = input() import re num = re.sub("\\D", "", w) n = len(num) if n == 0: print(0) else: ans = 0 for i in range(n): ans = ans + int(num[i]) print(ans)