#include <iostream>
#include <algorithm>
#include <string>
#include <cstdlib>
using namespace std;

int main() {
  string s;
  int ans = 0;
  while(getline(cin, s)) {
    s += "$";
    string num;
    for(int i = 0; i < s.size(); ++i) {
      if(isdigit(s[i])) {
        num += s[i];
      } else if(num.size()) {
        ans += atoi(num.c_str());
        num = "";
      }
    }
  }
  cout << ans << endl;
  return 0;
}