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

int main(){
    string ss;
    int sum = 0;
    while( cin >> ss ){
        for( string::iterator it = ss.begin(); it != ss.end(); it++){
            if( isdigit(*it) ){
                int a = *it - '0';
                while( ++it != ss.end() && isdigit(*it) ){
                    a *= 10;
                    a += *it - '0';
                }
                if( it == ss.end() ) it--;
                sum += a;
            }
        }
    }
    cout << sum << endl;
    return 0;
}