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

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

	sum.writeln;
	return 0;
}