#include <iostream>
using namespace std;

int main() {

  char input;
  int ans = 0;
  int cnt = 0;

  while( cin >> input ) {
    if ( input >= '0' && input <= '9' ) {
      cnt = cnt*10 + input - '0';
    }else {
      ans += cnt;
      cnt = 0;
    }
  }

  ans += cnt;

  cout << ans << endl;

  return 0;

}