#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main() {
    int sum = 0;
    string s;
    while (cin >> s) {
        int t = 0;
        for (int i=0; i<(int)s.size(); ++i) {
            if (isdigit(s[i])) {
                t *= 10;
                t += s[i] - '0';
            } else {
                sum += t;
                t = 0;
            }
        }
        sum += t;
    }
    cout << sum << endl;
    return 0;
}