#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;

int main(){
	string s,a;
	int n = 0;
	while(getline(cin,s)){
		for(int i = 0;i < s.length();++i){
			if('0' <= s[i] && s[i] <= '9' && i < s.length()){
				a = s[i];
				++i;
				while('0' <= s[i] && s[i] <= '9' && i < s.length()){
					a += s[i];
					++i;
				}
				n += atoi(a.c_str());
			}
		}
	}
	cout << n << endl;
	return 0;
}