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