#include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<iostream>
#include<queue>
#include<map>
#include<set>
#include<complex>
#include<stack>
#include<cmath>

using namespace std;

#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)

int main(){
	
	string s;
	int cnt=0;
	while(cin>>s){
		s=s+'#';
		int now = 0;
		rep(i,s.size()){
			if('0'<=s[i]&&s[i]<='9'){
				now*=10;
				now+=(s[i]-'0');
			}else{
				cnt+=now;
				now=0;	
			}
		}
		
		
	}
	printf("%d\n",cnt);
	
	
}