#include<iostream>
#include<stdio.h>
#include<stdlib.h>
using namespace std;

int main()
{
	char temp;
	char str[80];
	int ansho=0;
	while(true)
	{
	int strcount = 0;
		while(cin >> temp)
		{
			if('0'<=temp&&temp<='9')
			{
				str[strcount] = temp;
				strcount++;
			}
			else
			{
			str[strcount]='a';
			temp = 0;
			break;
			}
		}
		ansho += atoi(str);
		if(cin.eof())break;
	}

	cout << ansho << endl;
	return 0;
}