#include <iostream>
#include <string>
using namespace std;

int main() {

  string input;
  int ans = 0;
  int cnt = 0;

  while( getline( cin, input ) ) {
    ans += cnt;
    cnt = 0;
    for ( int i = 0; i < input.size(); i++ ) {
      if ( input[i] >= '0' && input[i] <= '9' ) {
	cnt = cnt*10 + input[i] - '0';
      }else {
	ans += cnt;
	cnt = 0;
      }
    }
  }

  ans += cnt;

  cout << ans << endl;

  return 0;

}