s = input() ans = 0 for i in s: if 48 <= ord(i) <= 57: ans += int(i) print(ans)