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