#include <iostream>
#include <cctype>
using namespace std;

string sentence;
typedef string::const_iterator State;

int parse(State &it){
  int ret = 0;
  while(isdigit(*it)){
    ret = ret * 10;
    ret = ret + *it - '0';
    it++;
  }
  return ret;
}

int main(void){
  int sum = 0;
  while(cin >> sentence){
    for(State it = sentence.begin(); it != sentence.end(); it++){
      if(isdigit(*it)){
        sum += parse(it);
        it--;
      }
    }
  }
  cout << sum <<endl;
  return 0;
}