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

int main()
{
	string s;
	char ch;
	int ans = 0;
	while(cin >> ch){
		if('0' <= ch && ch <= '9'){
			s.push_back(ch);
		} else {
			if(s.size()){
				ans += atoi(s.data());
				s = "";
			}
		}
	}
	if(s.size()) ans += atoi(s.data());
	cout << ans << endl;
}