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

int main() {
    long long sum = 0;
    string line;
    while (getline(cin, line)) {
        line.erase(0, line.find_first_of("0123456789"));
        while (line.empty() == false) {
            istringstream ss(line);
            int i;
            ss >> i;
            sum += i;
            line.erase(0, line.find_first_not_of("0123456789"));
            line.erase(0, line.find_first_of("0123456789"));
        }
    }
    cout << sum << endl;
}