

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

main(){
  int n=0,sum=0;
  char c;
  while(cin >> c){

    if('0' <=c && c <= '9'){
      n *= 10;//
      //    n += atoi(c);
      n += c -'0';//'0'=48charc48//
    }
    else{
      sum += n;n=0;
    }
  }
  cout << sum << endl;
  

  return 0;
}