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