S = input() numlist = [str(x) for x in range(10)] ans = 0 for s in S: if s in numlist: ans += int(s) print(ans)