#include <iostream>
#include <cstdio>
#include <cstring>
#include <cctype>
#include <string>
#include <cmath>
#include <algorithm>
#define CHAR_NUM 100

using namespace std;

int main(void) {
    char str[CHAR_NUM];
    int i;
    int sum = 0, count = 0;
    
    while(scanf("%s", str) != EOF) {
        int len = (int)strlen(str);
        for(i = len - 1; i >= 0; i--) {
            if(isdigit(str[i]))
                sum += pow(10, (count++)) * ((int)str[i] - '0');
            else
                count = 0;
        }
        count = 0;
    }
    
    cout << sum << endl;
    
    return(0);
}