S=list(input()) ans=0 for i in S: if ord(i)>=0x30 and ord(i)<=0x39: ans += int(i) print(ans)