#include<iostream>
using namespace std;
int main(){
  string s;
  int ans=0;
  int sum;
  int flag=1;
  int temp=0;
  while(cin>>s){
    sum = 0;
    for(int i=0;i<s.size();i++){
      if('0' <= s[i] && s[i] <= '9'){
	sum = 10*sum + (s[i]-'0');
      }else{
	ans += sum;
	sum = 0;
      }
    }
    ans += sum;
  }
  cout<<ans<<endl;
}