ans = 0 S = input() for i in range(len(S)): c = S[i] if ord("0") <= ord(c) <= ord("9"): ans += int(c) print(ans)