#include <bits/stdc++.h>
#define rep(i,l,n) for(int i=l;i<n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
using namespace std;

int main(){
	int ans=0;
	string s;
	while(cin>>s){
		rep(i,0,s.size()){
			if(s[i]-'0'>=0 && s[i]-'0'<10){
				rep(j,i,s.size()){
					if(s[j]-'0'<0 || s[i]-'0'>=10){
						ans+=atoi(s.substr(i,j-i).c_str());
						//cout<<atoi(s.substr(i,j-i).c_str())<<endl;
						i = j;
						break;
					}
				}
			}
		}
	}
	o(ans);
}