#include<bits/stdc++.h>

using namespace std;

int main()
{
  int sum = 0;
  string s;

  while(cin>>s){
    int check = 0;
    int temp = 0;
    
    for(int i = 0; i < s.size();++i){
      if(!isdigit(s[i])){
        check = 0;
      }
      else{
        if(check == 0){
          temp += s[i] - 48;
          check = 1;
        }
        else{
          temp = temp * 10;
          temp += s[i] - 48;
        }
      }

      if(check == 0 || i == s.size() - 1){
        sum += temp;
        temp = 0;
      }
    }
  }
  cout<<sum<<endl;
  
  return 0;
}
