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