#include <cstdio>
#include <vector>
#include <algorithm>
#include <cstring>
#include <string>
#include <cctype>
#include <sstream>
#include <cmath>
#include <climits>
#include <set>
#include <iostream>
#include <map>
#include <functional>
#include <cstdlib>

using namespace std;

#define reep(i,f,n) for(int i=f; i<int(n); ++i)
#define rep(i,n) reep(i,0,n)

typedef vector<int> vi;
typedef pair<int, int> pii;

int main()
{
	int sum = 0;
	char str[128];
	while(scanf("%s", str) != EOF){
		int diglen = 0;
		int n = strlen(str);
		rep(i, n+1){
			if(isdigit(str[i])){
				++diglen;
			}else if(diglen){
				str[i] = '\0';
				sum += atoi(str+i-diglen);
				diglen = 0;
			}
		}
	}
	printf("%d\n", sum);

	return 0;
}