#include <iostream>
#include <string>
using namespace std;

int main(){
    int sum = 0, n = 0;
    string s;

    while( getline(cin,s) ){
        for(int i=0 ; i<s.size() ; i++){
            if( s[i]>='0' && s[i]<='9'){
                n *= 10;
                n += s[i]-'0';
            }else{
                sum += n;
                n = 0;
            }
        }
    }
    cout << sum << endl;
    return 0;
}