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

using namespace std;

int main(){

	string str="", sub;
	
	while(cin>>sub, !cin.eof()){
		str+=sub;
	}
	
	str+='Z';
	
	int key=0, tmp, n=str.size();
	string s="";
	
	for(int i=0; i<n; ++i){
			
		if('0'<=str[i]&&str[i]<='9'){
			s+=str[i];
		}
		else if(s!=""){
			stringstream ss(s);
			ss>>tmp;
			key+=tmp;
			s="";
		}
	}
	
	cout << key << endl;
	
	return 0;
}