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

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