#include <iostream>
#include <cstdio>
#include <string>
#include <cstdlib>
using namespace std;
#define rep2(x,from,to) for(int x = (from); x < (to); ++(x))
#define rep(x,to) rep2(x,0,to)
int main() {
	string s;
	char c[10000][6];
	int cnt = 0;
	int dcnt = 0;
	while(cin >> s) {
		rep(i,s.length()) {
			if(isdigit(s[i])) {
				c[cnt][dcnt] = s[i];
				dcnt++;
			} else {
				if(dcnt != 0) {
					dcnt = 0;
					cnt++;
				}
			}
		}
	}
	int ret = 0;
	rep(i,cnt) {
		ret += atoi(c[i]);
	}
	cout << ret << endl;
	return 0;
}