#include<iostream>
#include<string>
using namespace std;

int main(){
  char c;
  int pass=0, sum=0;

  while(cin >> c){
    //    for(int i=0; i<s.size(); i++){

    //      if('0' <= s[i]  && s[i] <= '9'){
    if('0' <= c  && c <= '9'){
	pass *= 10;
	pass += c - '0';
      }
      else{
      sum += pass;
      pass = 0;
      }

      // }

  }
  cout << sum << endl;
  return 0;
}