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

int main()
{
    string str;

    int sum = 0;
    while( cin >> str )
    {
        int digit = 1;
        for( int i = str.size() - 1; i >= 0; i-- )
        {
            if( '0' <= str[i] && str[i] <= '9' )
            {
                sum += ( str[i] - '0' ) * digit;
                digit *= 10;                        
            }
            else
                digit = 1;
        }
    }

    cout << sum << endl;

    return 0;
}
