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