#include<iostream>
#include<string>
using namespace std;
int main()
{
	string in;
	int ans=0;
	while(getline(cin,in))
	{
		int cnt=0;
		for(int i = 0; i < in.size(); ++i)
		{
			if('0'<=in[i]&&in[i]<='9')
			{
				cnt*=10;
				cnt+=in[i]-'0';
			}
			else
			{
				ans+=cnt;
				cnt=0;
			}
		}
		ans+=cnt;
	}
	cout<<ans<<endl;
  return 0;
}