#include<iostream>
#include<sstream>
#include<string>
#include<algorithm>

using namespace std;

bool is_number(const char& c){
  return (c >= '0' && c <= '9');
}

bool is_not_number(const char& c){
  return !(c >= '0' && c <= '9');
}

int string_to_int(const string& s){
  int n;
  istringstream iss(s);
  iss >> n;
  return n;
}

int solve(string& s){
  int n=0;
  string::iterator i, j;
  j = s.begin();
  while(1){
    i = find_if(j, s.end(), is_number);
    if(i == s.end()) return n;
    j = find_if(i, s.end(), is_not_number);
    n += string_to_int(string(i, j));
  }
}

int main(){
  int n = 0;
  string s;
  while(getline(cin, s)) n += solve(s);
  cout << n << endl;
  return 0;
}