#include <iostream>
#include <string>
#include <cmath>
using namespace std;

int stoi(string str) {
  int ans = 0;
  for(int i = 0; i < str.length(); i++) {
    ans += (int)(str[i] - '0') * (int)pow(10.0, (int)str.length()-i-1);
  }
  return ans;
}

bool isNum(char c) {
  if(c >= '0' && c <= '9') return true;
  return false;
}

int main() {
  int sum = 0;
  while(1) {
    if(cin.eof()) break;
    string str;
    getline(cin, str);
    string num = "";
    for(int i = 0; i < str.length(); i++) {
      if(isNum(str[i])) num += str[i];
      if(( !isNum(str[i]) || i+1 == str.length() ) && num.length() > 0) {
	sum += stoi(num);
	num = "";
      }
    }
  }
  cout << sum << endl;
  return 0;
}