S = list(input()) ans = 0 for s in S: if '0' <= s <= '9': ans += int(s) print(ans)