import sys input=lambda: sys.stdin.readline().rstrip() S=input() ans=0 for s in S: if 48<=ord(s)<=57: ans+=int(s) print(ans)