main(){char s[10001];gets(s);int i=0,u=0;while(s[i]!='\0'){if(s[i]>=48&&s[i]<=58)u+=s[i]-48;i++;}printf("%d",u);}