#include <iostream>
#include <string>
using namespace std;

int main(){
	string str;
	int sum=0;
	while(cin>>str){
		str+="#";
		int tmp=0;
		for(int i=0;i<str.size();i++){
			if('0'<=str[i]&&str[i]<='9'){
				tmp*=10;
				tmp+=(str[i]-'0');
			}
			else{
				sum+=tmp;
				tmp=0;
			}
		}
	}
	cout<<sum<<endl;
	return 0;
}