#include <iostream>

int main(int argc, const char * argv[]) {
    char basicstr[80];
     int sum = 0;
    
    while(scanf("%s",basicstr) != EOF){
        int x  = 0;
        for(int i = 0;basicstr[i];i++){
            if(isdigit(basicstr[i])){
                x = x * 10 + (basicstr[i] - '0');
            }else{
                sum += x;
                x = 0;
            }
        }
        sum += x;
    }
    
    printf("%d\n",sum);
    return (0);
}