#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <cctype>
#include <cstdlib>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()

int main() {
  string s;
  int ans =0;
  while(getline(cin,s)) {
    for(int i=0; i<s.length(); i++) {
      if (isdigit(s[i])) {
        int p=i;
        for (; i<s.length(); i++) {
          if (!isdigit(s[i])) break;
        }
        ans += atoi(s.substr(p,i-p).c_str());
      }
    }
  }
  cout << ans << endl;
}