#include <iostream>
#include <string>

using namespace std;

int main(){
    int ans = 0;
    int tmp = 0;
    string str;
    while(cin >> str){
	tmp = 0;
	for(int i=0;i<str.size();i++){
	    if('0'<=str[i] && str[i] <='9'){
		tmp += str[i] -'0';
	    }
	    if(i+1 == str.size() || '0' > str[i+1] || str[i+1] > '9'){
		ans += tmp;
		tmp = 0;
	    }
	    else{
		tmp *= 10;
	    }
	}
    }
    cout << ans << endl;
    return 0;
}