#include <iostream>
#include <sstream>
#include <string>
int main(){
	std::string s;
	std::stringstream ss;
	int a=0,i;
	while(std::cin>>s){
		for(i=0;i<(int)s.size();i++)ss<<((isdigit(s[i]))?s[i]:' ');
		while(ss>>i)a+=i;
		ss.clear();
	}
	std::cout<<a<<"\n";
}