#include<iostream>
#include<string>
#include<math.h>

using namespace std;

int main(void)
{
	int ans=0;
	while(1)
	{
		string s;
		cin>>s;
		if(cin.eof())break;
		int k=0;
		for(int i=s.length()-1;i>=0;i--)
		{
			if('0'<=s[i]&&s[i]<='9')
			{
				ans+=pow(10.0,k)*(s[i]-'0');
				k++;
			}
			else k=0;
		}
	}
	cout<<ans<<endl;
}