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