#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
	int num = 0, sum = 0;
	char c;
	
	while ((c = getchar()) != EOF){
		if ('0' <= c && c <= '9'){
			num *= 10;
			num += c - '0';
		}
		else {
			sum += num;
			num = 0;
		}
	}
	cout << sum << endl;
}