#include <iostream>
#include <string>
#include <cstdlib>

using namespace std;

int main()
{
    size_t sum = 0;
    string s;
    while( cin >> s ) {
        for( auto it=s.cbegin(); it<s.cend(); ++it )
        {
            if ( *it >= '0' && *it <= '9' ) {
                string t;
                t += *it;
                for( it=it+1; it < s.cend() && *it >= '0' && *it <= '9'; ++it )
                    t += *(it);

                sum += atoi( t.c_str() );
            }
        }
    }
    cout << sum << endl;
}
#include <iostream>
#include <string>
#include <cstdlib>

using namespace std;

int main()
{
    size_t sum = 0;
    string s;
    while( cin >> s ) {
        for( auto it=s.cbegin(); it<s.cend(); ++it )
        {
            if ( *it >= '0' && *it <= '9' ) {
                string t;
                t += *it;
                for( it=it+1; it < s.cend() && *it >= '0' && *it <= '9'; ++it )
                    t += *(it);

                sum += atoi( t.c_str() );
            }
        }
    }
    cout << sum << endl;
}
#include <iostream>
#include <string>
#include <cstdlib>

using namespace std;

int main()
{
    size_t sum = 0;
    string s;
    while( cin >> s ) {
        for( auto it=s.cbegin(); it<s.cend(); ++it )
        {
            if ( *it >= '0' && *it <= '9' ) {
                string t;
                t += *it;
                for( it=it+1; it < s.cend() && *it >= '0' && *it <= '9'; ++it )
                    t += *(it);

                sum += atoi( t.c_str() );
            }
        }
    }
    cout << sum << endl;
}