#include <iostream>
using namespace std;

string s;
int i;

int char2num(){
    int n = 0;
    for (; '0' <= s[i] && s[i] <= '9' && i < s.size(); i++){
	n *= 10;
	n += s[i] - '0';
    }
    return n;
}

int main(){

    int n = 0;
    while (cin >> s){
	for (i = 0; i < s.size(); i++)
	    if ('0' <= s[i] && s[i] <= '9') n += char2num();
    }
    cout << n << endl;
}