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