#include <iostream>
#include <cstring>
#include <vector>

using namespace std;

char s[80];

int num_st = 0;
int sec_n = 0;

int main() {
    cin.read(s, 80);
    int len = strlen(s);
    bool in_num = false;
    for (int i = 0; i < len; i++) {
        if ( isdigit(s[i]) ) {
            in_num = true;
            num_st = num_st * 10 + (s[i] - '0');
        } else {
            if (in_num) {
                in_num = false;
                sec_n += num_st;
                num_st = 0;
            }
        }
    }
    cout << sec_n << endl;
}