#include<sstream>
using namespace std;
void replaceblank(string &s){
	for(int i=0;i<s.size();i++)if(s[i]<'0'||s[i]>'9')s[i]=' ';
}
int main(){
	string s; int ans=0,t;
	while(getline(cin,s)){
		replaceblank(s);
		stringstream ss; ss<<s;
		while(ss>>t)ans+=t;
	}
	cout<<ans<<endl;
	return 0;
}