#include <bits/stdc++.h>
using namespace std;


int main() {
    string s;
    int ans = 0;
    while(cin >> s) {
        int pre_digit = 1;
        int n = s.size();
        for(int i = n-1; i>=0; i--) {
            if(isdigit(s[i])) {
                ans += (s[i] - '0') * pre_digit;
                pre_digit *= 10;
                continue;
            }
            pre_digit = 1;
        }
    }

    cout << ans << endl;

    return 0;
}