s = input() res = 0 for c in s: if ord('0') <= ord(c) <= ord('9'): res += int(c) print(res)