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

using namespace std;

int main(void){
  string str = "";
  char tmp;
  bool digit = false;
  int ret=0;
  int itmp;
  while(cin >> tmp){
    if('0' <= tmp && tmp <= '9'){
      str += tmp;
      digit = true;
    }else if(digit == true){
      istringstream iss(str);
      iss >> itmp;
      ret += itmp;
      str.clear();
      digit = false;
    }
  }
  cout << ret << endl;
}