#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>

using namespace std;

int main() {
	string str, num;
	int ans = 0;
	while (cin >> str) {
		for (int i = 0; i < str.size(); i++) {
			num = "";
			for (int j = 0; isdigit(str[i]); i++, j++) {
				num += str[i];
			}
			if (num != "")
				ans += atoi(num.c_str());
		}
	}
	cout << ans << endl;
	return 0;
}