#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <fstream>
#include <complex>
#include <stack>
#include <queue>

using namespace std;
typedef long long LL;
typedef pair<int, int> P;
static const double EPS = 1e-5;

#define FOR(i,k,n) for (int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)
long long toInt(string str){
  stringstream ss;
  ss<<str;
  long long ret;
  ss>>ret;
  return ret;
}
int main(void){
  long long ans = 0;
  string line;
  while(cin>>line){
    for(int i=0;i<line.size();i++){
      if(line[i]>='0'&&line[i]<='9'){
        for(int j=i;j<line.size();j++){
          if(line[j]<'0'||line[j]>'9'||j==line.size()-1){
            ans+=toInt(line.substr(i,j-i+1));
            i=j;
            break;
          }
        }
      }
    }      
  }
  cout<<ans<<endl;
  return 0;
}