#include <iostream>
#include <string>

using namespace std;

int main() {
  int ans = 0;
  string str;
  while (cin >> str) {
    int scale = 1;
    for (int i = str.length()-1; 0<= i; --i) {
      int a = str[i] - '0';
      if ((0<=a) && (a<=9)) {
        ans += a * scale;
        scale *= 10;
      }
      else {
        scale = 1;
      }
    }
  }
  cout << ans << endl;
}
