import std.stdio,std.string,std.conv,std.ascii;

int main()
{
	string s;
	int sum = 0;
	while((s = readln.chomp).length != 0)
	{
		bool flag = true;
		string temp = "";
		foreach(i;0..s.length)
		{
			if(isDigit(s[i]))
			{
				temp ~= s[i];
				flag = false;
			}
			else if(flag == false)
			{
				sum += temp.to!int;
				flag = true;
				temp = "";
			}
		}
	}

	sum.writeln;
	return 0;
}