#include <iostream>
#include <cmath>
using namespace std;
int main(){
	int num=0;
	string s;
	while(getline(cin,s)){
		for(int i=s.size()-1,n=0;i>=0;--i){
			if('0'<=s[i]&&s[i]<='9') num+=(s[i]-'0')*pow(10,n++);
			else n=0;
		}
	}
	cout<<num<<endl;
	return 0;
}