#include <stdio.h>

int main(){
    int secretNo=0;
    int n=0;
    char buf[100];
    char *pt;
    
    while (scanf("%s",buf)!=EOF){
        pt=buf;
        while (*pt!='\0'){
            if (*pt<'0' || *pt>'9'){
                pt++;
                continue;
            }
            for (n=0; *pt>='0' && *pt<='9'; pt++){
                 n = n*10 + *pt - '0';
            }
            secretNo += n;
        }
    }
    printf("%d\n",secretNo);
    
    return 0;
}