s = input() ans = 0 for c in s: if "0" <= c <= "9": ans += int(c) print(ans)