#include <iostream>
#include <string>
#include <cstdlib>

using namespace std;

int main(){

	string s;
	int sum=0;
	while(cin>>s){
		for(int i = 0; i < s.size(); i++){
			if(s[i]>='0'&&s[i]<='9'){
				int j = i+1;
				while(1){
					if(s[j]>='0'&&s[j]<='9'){
						j++;
					}
					else
						break;
				}
				sum+=atoi(s.substr(i,j-i).c_str());
				i=j-1;
			}
		}
	}
	cout<<sum<<endl;
	return 0;
}