#include<map>
#include<set>
#include<list>
#include<cmath>
#include<queue>
#include<stack>
#include<cstdio>
#include<string>
#include<vector>
#include<complex>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<numeric>
#include<sstream>
#include<iostream>
#include<algorithm>
#include<functional>

using namespace std;

int main(){
	int cnt=0,sum=0;
	char str;
	while(str = getchar(),~str){
		if(str >= '0' && str <= '9'){
			cnt *= 10;
			cnt += str-'0';
		}else{
			sum += cnt;
			cnt = 0;
		}
	}
	cout << sum << endl;
	return 0;
}