#include <iostream>
#include <string>

using namespace std;

int main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);

  string str;
  int sum = 0;

  while (getline(cin, str)){
    int a = 0;
    bool f = false;
    for (int i = 0; i < str.size(); i++){
      if ('0' <= str[i] && str[i] <= '9'){
        if (f){
          a *= 10;
          a += (str[i] - '0');
        } else {
          a = str[i] - '0';
          f = true;
        }
      } else {
        sum += a;
        a = 0;
        f = false;
      }
    }
  }

  cout << sum << endl;
}