S=str(input()) x=int(0) i=0 for n in S: if ord(n)>=48 and ord(n)<=57: x+=int(S[i]) i+=1 print(x)