#include<iostream>
#include<stdio.h>
#include<string>
#include<vector>
#include<algorithm>
#include<sstream>

using namespace std;

int make(string in){
  stringstream ss;
  ss << in;
  int i;
  ss >> i;
  return i;
}

int main(){

  vector<string> V;
  char in;
  string s = "\0";

  while(cin >> in){
    if(in >= '0' && in<= '9'){
      s += in;
    }else{
      if(s.length() > 0){
	V.push_back(s);
	s = "\0";
      }
    }
  }

    int sum = 0;
    for(int i = 0; i < V.size(); i++){
      sum += make(V[i]);
    }

    cout << sum << endl;

  return 0;
}