#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    int ret = 0;
    for(;;){
        string s;
        if(!(cin >> s)){
            cout << ret << endl;
            return 0;
        }
        
        int n = s.size();
        for(int i=0; i<n; ++i){
            if('0' <= s[i] && s[i] <= '9'){
                int j = i+1;
                while(j < n && '0' <= s[j] && s[j] <= '9')
                    ++ j;
                ret += atoi(s.substr(i, j-i).c_str());
                i = j;
            }
        }
    }
}