#include <bits/stdc++.h>
using namespace std;

#define rep(i,n) for(int i=0;i<(n);++i)
#define loop for(;;)
#define trace(var) cerr<<">>> "<<#var<<" = "<<var<<endl;
#define inf (1e9)
#define eps (1e-9)

int main() {
  int ans = 0;
  stringstream ss;
  loop {
    char c; cin >> c;
    if (not cin) break;
    if ('0' <= c and c <= '9') ss << c;
    else ss << ' ';
  }
  loop {
    int x; ss >> x;
    if (not ss) break;
    ans += x;
  }
  cout << ans << endl;

  return 0;
}