#include<iostream>

using namespace std;

int main(){

  string in;
  int sum = 0;
  while(getline(cin,in)){
    int kake = 1;
    for(int i = in.length()-1; i >= 0; i--){
      if(in[i] < '0' || in[i] > '9'){
	kake = 1;
	continue;
      }
      sum += (in[i] - '0') * kake;
      kake *= 10;
    }
  }
  cout << sum << endl;
  return 0;
}