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

int main(){
  string s;
  int pass=0, sum=0;

  while(cin >> s){
    for(int i=0; i<s.size(); i++){
      if(s[i] >= '0' && s[i] <= '9'){
	pass *= 10;
	pass += s[i] - '0';
      }
      else{
      sum += pass;
      pass = 0;
      }
    }
  }
    cout << sum << endl;
}