#include <iostream>
#include <string>

using namespace std;

int main()
{
	string buf;
	int num = 0;
	while ( getline(cin, buf) ) {
		int tmp_num = 0;
		bool num_mode = false;
		while ( !buf.empty() ) {
			if ( '0' <= buf[0] && buf[0] <= '9' ) {
				tmp_num *= 10; tmp_num += buf[0] - '0';
				num_mode = true;
			}
			else if (num_mode) {
				num += tmp_num; tmp_num = 0;
				num_mode = false;
			}
			buf.erase( buf.begin() );
		}
	}
	
	cout << num << endl;
	
	return 0;
}