#include <iostream>
#include <sstream>
#include <ctype.h>
using namespace std;

int main(){
	string str;
	int d, sum=0, len;
 
	while(1){
                getline(cin, str);
		if(cin.eof())break; 
		len = str.length();
	
	for(int i=0; i<len; i++){if(isalpha((int)str[i])||str[i]=='.')str.replace(i, 1," ");}
	
	istringstream ss(str);

	while(!ss.eof()){ss>>d;	sum+=d;	d=0;}
	
	}
	cout<<sum<<endl;
	
  return 0;
}