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

int main(){
	string str;
	int count = 0;
	while(cin >> str){
		int tmp = 0;
		for(int i = 0; i <= (int)str.size(); i++){
			if('0' <= str[i] && str[i] <= '9'){
				tmp = tmp * 10 + str[i] - '0';
			}else{
				count += tmp;
				tmp = 0;
			}
		}
	}
	cout << count << endl;
	return 0;
}
