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