#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <cstring>
#include <functional>

using namespace std;

#define rep(i,n) for((i)=0;(i)<(int)(n);(i)++)
#define foreach(itr,c) for(__typeof((c).begin()) itr=(c).begin();itr!=(c).end();itr++)
inline int in(){ int x; scanf("%d",&x); return x;}
inline bool suji(char a){ if('0' <= a && a <= '9') return true; else return false; }
template<class T> inline T toA(string& s){T v; istringstream sin(s);sin>>v;return v;}

int main(){
  int i,j,k;
  int ans = 0;
  string s;
  vector<string> data, res;

  while(cin >> s) data.push_back(s);

  rep(i,data.size()){
    j = 0;
    while(j < data[i].size()){
      string t;
      while(j < data[i].size() && suji(data[i][j])){
        t += data[i][j];
        j++;
      }
      if(t != "") res.push_back(t);
      j++;
    }
  }

//  rep(i,res.size()) cout << res[i] << endl;
  rep(i,res.size()) ans += toA<int>(res[i]);
  printf("%d\n",ans);

  return 0;
}