#include <bits/stdc++.h>
#define range(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define rep(i,n) range(i,0,n)
using namespace std;

int main(void){
	int ans=0;
	while(1){
		string s;
		cin >> s;
		if(cin.eof()) break;
		int n=s.size();
		int cur=0;
		rep(i,n){
			if(isdigit(s[i])){
				cur=cur*10+(s[i]-'0');
			}else{
				ans+=cur;
				cur=0;
			}
		}
		ans+=cur;
	}
	cout << ans << endl;
	return 0;
}