#include int main(){ int n, i=0, sum=0; char s[10001]; scanf("%s", s); while(s[i] != '\0'){ if(s[i]>='0' &&'9'>=s[i]){ sum += s[i]-'0'; } i++; } printf("%d\n", sum); return 0; }