Written By : MathModel
Since the string may contain some other invalid symbols , we reject them and only count digits
we read character by charcter and convert it to int (if possible)
s=input()
ans=0
d=list('0123456789')
for i in s:
if(i in d):ans+=int(i)
print(ans)