#include <iostream> //üoÍ
#include <string>   //¶ñ
#include <vector>   //®Izñ
#include <sstream>  //¶ñtH[}bg
#include <cctype>
#include <cstdlib>

using namespace std;

int main(){
	string s;
	
	char c;
	int	n = 0;
	while(cin >> s){
	
		for(int i = 0; i < s.size(); i++){
			if(isdigit(s[i]) != 0){
				int j = i;
				for( i ; isdigit(s[i]) != 0; i++){
				}
				string str = "";
				for( j ; j != i ; j++){
					str += s[j];
				}
				n += atoi(str.c_str());
			}
		}

	}
	

	cout << n << endl;
	

	return 0;
	
}