#include int main(void) { char input[256] = { '\0' }; char* p; int i, sum = 0; scanf("%s", input); for (p = input; *p != '\0'; p++) if (*p >= '0' && *p <= '9') sum += (*p - '0'); printf("%d\n", sum); return 0; }