#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;

bool isNumber(char a) {
    return(a >= '0' && a <= '9');
}

int calc(string a) {
    int sum = 0;
    int keta = 0;
    for(int r = (int)a.size() - 1; r >= 0; r--) {
        if(isNumber(a[r])) {
            sum += (a[r] - '0') * pow(10, keta);
            keta++;
        } else keta = 0;
    }
    return(sum);
}

int main(void) {
    string input;
    int sum = 0;
    while(cin >> input) {
        sum += calc(input);
    }
    
    cout << sum << endl;
    return(0);
}