#include <iostream>
#include <sstream>
#include <string>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#define n 100
using namespace std;
int main(){
	string s;
	int ans = 0;
	while(getline(cin,s)){
		bool start = false;
		int sn = 0;
		int t;
		for(int i=0;i<s.size();i++){
			if((not start) and s[i]>'0' and s[i]<='9'){
				start = true;
				sn = i;
				if(i==s.size()-1){
					istringstream is(s.substr(i,1));
					is >> t;
					ans += t;
				}
			}
			else if(start and (s[i]<'0' or s[i]>'9')){
				start = false;
				istringstream is(s.substr(sn,i-sn));
				is >> t;
				ans += t;
			}
			else if(start and s[i]>'0' and s[i]<='9' and i==s.size()-1){
				istringstream is(s.substr(sn,i-sn+1));
				is >> t;
				ans += t;
			}
		}
		cout << ans << endl;
	}
	cout << ans << endl;
}