#include <iostream>
#include <string>

using namespace std;

int main() {
    int ans = 0, num;
    string s;
    while (cin >> s) {
        num = 0;
        for (int i = 0; i < s.size(); i++) {
            if ('0' <= s[i] && s[i] <= '9') {
                num = num * 10 + s[i] - '0';
            }
            else {
                ans += num;
                num = 0;
            }
        }
    }
    cout << ans << endl;

    return 0;
}