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

using namespace std;

int main(){

	string str="", sub;
	while(cin>>sub, !cin.eof()){
		str+=sub;
	}
	str+='Z';
	
	bool f=false;
	int n = str.size()-1, key=0;
	string s="";

	for(int i=0; i<n; ++i){
			
		if('0'<=str[i]&&str[i]<='9'){
			s+=str[i];
			f=true;
		}
		else if(f&&!('0'<=str[i]&&str[i]<='9')){	
			int tmp;
			stringstream ss(s);
			ss>>tmp;
			key+=tmp;
			f=false;
			s="";
		}	
	}

	cout << key << endl;
	
	return 0;
}