#include <iostream>
#include <cstdlib>
#include <string>
int main(){
	std::string s,x="";
	while(std::cin>>s)x+=s;
	s="";
	int a=0,i=0;
	for (;i<(int)x.size();i++)
		if (isdigit(x[i])) s+=x[i];
		else
			if (!s.empty()){
				a+=atoi(s.c_str());
				s="";
			}
	std::cout<<a<<"\n";
}