#include <iostream>
#include <string>
#include <sstream>

using namespace std;

int main(){

	int res=0, tmp=0;
	string str;
	
	while(cin>>str, !cin.eof()){
		
		tmp = 0;

		for(int i=0; i<str.size(); ++i){
			
			if('0'<=str[i]&&str[i]<='9'){
				tmp = tmp*10 + (int)(str[i]-'0');
			}
			else{
				res += tmp;
				tmp = 0;
			}
		}

		res += tmp;
	}
	
	cout << res << endl;
	
	return 0;
}