#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <list>
#include <iostream>
#include <climits>
#include <cfloat>


using namespace std;

int main()
{
	char buf[81];
	int n = 0;
	while (scanf("%s\n", buf) != EOF)
	{
		int t = 0;
		for (int i = 0; buf[i] != '\0'; ++i)
		{
			char c = buf[i];
			if (isdigit(c))
				t = t*10 + (c-'0');
			else
			{
				n += t;
				t = 0;
			}
		}
	}
	printf("%d\n", n);
	
	return 0;
}