#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
 
#define INPUT_FROM_FILE (0) 
#if INPUT_FROM_FILE
#include <fstream>
#endif
 
int main(){
	std::string buf;
	std::string str;
	int num = 0;


#if INPUT_FROM_FILE
	std::ifstream ifs("test.txt");
	//FILE *fp = fopen("test.txt", "r");
#endif

#if INPUT_FROM_FILE
	while(std::getline(ifs, buf)){
#else
	while(std::getline(std::cin, buf)){
#endif
		str += buf;
	}
 
	for(int i = 0; i < str.size(); i++){
		if(str[i] >= '0' && str[i] <= '9'){
			int j = i + 1;
			for(; j < str.size(); j++){
				if(!(str[j] >= '0' && str[j] <= '9')){
					break;
				}
			}
			num += std::stoi(str.substr(i, j - i));
			i = j;
		}
	}

	std::cout << num << std::endl;


#if INPUT_FROM_FILE
	//fclose(fp);
#endif
    return 0;
}
