#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() {
  stringstream ss;
  char c;
  while (cin >> c) ss << (isdigit(c) ? c : ' ');
  int x;
  int ans = 0;
  while (ss >> x) ans += x;
  cout << ans << endl;

  return 0;
}