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

int main(){
	int n=0,sum=0;
	char c;
	while(cin>>c){
		if(isdigit(c))n = 10*n+c-'0';
		else {
			sum += n;
			n=0;
		}
	}
	cout<<sum+n<<endl;
	return 0;
}