#include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
const ld eps = 1e-9;


int main() {
	string st;
	int ans = 0;
	while (getline(cin,st)) {
		int num=0;
		for (auto c : st) {
			if (isdigit(c)) {
				num*=10;
				num+=c-'0';
			}
			else {
				ans+=num;
				num=0;
			}
		}
		ans+=num;
	}
	cout<<ans<<endl;
	return 0;
}
