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

int main(){
    string in;
    int sum = 0;
    while( cin >> in ){
        for( int i=0; i<in.length(); i++ ){
            if( '0' <= in[i] && in[i]<= '9' ){
                int add = 0;
                do{
                    add = add*10 + in[i]-'0';
                    i++;
                }while( i<in.length() && '0' <= in[i] && in[i] <= '9' );
                sum += add;
            }
        }
    }
    cout << sum << endl;
    return 0;
}