#define	_USE_MATH_DEFINES
#include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cfloat>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <string>
#include <set>
using namespace std;
int main(){
	
	string s;
	int sum=0;
	while(cin>>s){
		string a="";
		for(int i=0;i<s.size();i++){
			if(s[i]>='0'&&s[i]<='9')
				a=a+s[i];
			else{
				if(a!="")
				sum+=stoi(a);
				a="";
			}
		}
	}
	cout<<sum<<endl;
	
}