#include<iostream>
#include<string>
using namespace std;
int main(){
	int count=0;
	string a;
	while(cin>>a){
		int i=a.size()-1;
		int e=1;
		while(true){
			if(a[i]>='0'&&a[i]<='9'){
				count+=e*(a[i]-'0');
				e*=10;
			}
			else
				e=1;
			if(i==0)
				break;
			i--;
		}
	}
	cout<<count<<endl;
	return 0;
}