#include <bits/stdc++.h>

using namespace std;

int main()
{
    string str;
    int sum = 0, num;
    
    while (getline(cin, str)) {
        for (int i = 0; i < (int)str.size(); i++) {
            if (isdigit(str[i])) continue;
            else {
                str[i] = ' ';
            }
        }

        stringstream ss(str);
        while (ss >> num) {
            sum += num;
        }
    }
    cout << sum << endl;
    return 0;
}