#include char input[10001]; int main(void) { 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; }