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

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

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

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

