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

int main(int argc, char** argv) {
    int secretNum = 0;
    string str;
    while(getline(cin, str)) {
        for(unsigned int i=0; i<str.size(); ++i) {
            if(str[i] < '0' || '9' < str[i]) {
                str[i] = ' ';
            }
        }
        stringstream ss(str);
        int j;
        while(ss >> j) {
            secretNum += j;
        }
    }
    cout << secretNum << endl;
    return 0;
}