#include <iostream>
#include <string>
#include <stdlib.h>
using namespace std;

int main() {
  string memo;
  int num = 0;
  int temp;

  cin >> memo;

  for(int i = 0; i < memo.size(); i++) {
    if(memo[i] >= 48 && memo[i] <= 57) {
      temp = temp * 10;
      temp += (memo[i] - '0');
    }
    else {
      num += temp;
      temp = 0;
    }
  }
  num += temp;

  cout << num << endl;
  return 0;
}

