s=input() n='123456789' x=0 for i in range(len(s)): if s[i] in n: x+=int(s[i]) print(x)