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

int main(int argc, const char * argv[])
{
    int snum = 0;
    int stuck = 0;
    string slit;
    while(cin >> slit){
        for (int i = 0; i < (int)slit.length(); i++) {
            if (isdigit(slit[i])) {
                stuck *= 10;
                stuck += slit[i] - '0';
            }
            if (!isdigit(slit[i + 1])) {
                snum += stuck;
                stuck = 0;
            }
        }
    }
    cout << snum << endl;
    return 0;
}