#include <string>
#include <cctype>
#include <iostream>
using namespace std;
#define loop(i,a,b) for(int i=a; i<(int)(b); i++)
#define rep(i,n) loop(i,0,n)

int Num(const string & s, int & i){
    int res = 0;
    while (isdigit(s[i])){
        res *= 10;
        res += s[i++] - '0';
    }
    return res;
}

int main(){
    int n = 0; string s;
    while (cin >> s){
        rep(i, s.size())
            if (isdigit(s[i]))
                n += Num(s, i);
    }
    cout << n << endl;
}