#include <bits/stdc++.h>

using namespace std;

int main() {
    int ans = 0;
    string s;
    while (getline(cin, s)) {
        int sz = s.size(), l, r;
        for (int i = 0; i < sz; i++) {
            if (!isdigit(s[i])) continue;
            l = i;
            while (isdigit(s[++i]));
            r = i;
            ans += atoi(s.substr(l, r - l).c_str());
        }
    }

    cout << ans << endl;

    return 0;
}
