//28
#include<iostream>
#include<sstream>
#include<string>
#include<cctype>

using namespace std;

int main(){
  int ans=0;
  for(string s;cin>>s;){
    for(int i=0;i<s.size();i++){
      if(!isdigit(s[i])){
	s[i]=' ';
      }
    }
    stringstream ss(s);
    for(int n;ss>>n;){
      ans+=n;
    }
  }
  cout<<ans<<endl;
  return 0;
}