#include <iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<sstream>
#include<cmath>
#include<numeric>
#include<map>
#include<stack>
#include<queue>
#include<random>
using namespace std;
int inf = 1e9;



int main() {
  string s;
  int cnt = 0;
  while( cin >> s ){

    string tmp = "";
    for(int i=0; i<s.size(); i++){
      if( '0' <= s[i] && s[i] <= '9' ) tmp += s[i];
      else{
        if( tmp.size() != 0 ){
          int a = stoi(tmp);
          cnt += a;
        }
        tmp = "";
      }
    }
    if( tmp.size() != 0 ){
      int a = stoi(tmp);
      cnt += a;
    }

  }
  cout << cnt << endl;

  return 0;
}




// EOF