#include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <algorithm>
#include <string>
#include <bitset>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <sstream>
#include <fstream>
#include <tuple>
#include <set>
#include <functional> 
#include <string.h>

#define X first
#define Y second
#define MP make_pair
#define MT make_tuple
#define FOR(i, n) for(int (i) = 0; (i) < (n); (i)++)
#define REP(i, a, n) for(int (i) = (a); (i) < (n); (i)++)
typedef long long ll;
typedef std::pair<int, int> pii;
typedef std::pair<ll, ll > pll;
using namespace std;
const int MAX = 101;
const double PI = 3.1415926535897932384;

template<class T, class U>
void convert(T &t, U &u){
	stringstream ss;
	ss << t;
	ss >> u;
}

int main(){
	string s;
	int ans = 0;
	while (cin >> s && s != "\0"){
		cin.ignore();
		int digit = 10;
		int tmp = 0;
		FOR(i, s.size()){
			if (s[i] - '0' >= 0 && s[i] - '0' <= 9){
				tmp *= digit;
				tmp += s[i] - '0';
			}
			else{
				ans += tmp;
				tmp = 0;
			}
		}
	}
	cout << ans << endl;
}