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

int main() {
  string memo;
  int num, temp;

  num = 0;
  while(cin >> memo) {
    temp = 0;
    for(int i = 0; i <= (int)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;
}

