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

int main()
{
  string str;
  int ans = 0;

  while (cin >> str){
    int num = 0;
    for (int i = 0; i < str.size(); i++){
      if (isdigit(str[i])){
        num *= 10;
        num += str[i] - '0';
      }
      else {
        ans += num;
        num = 0;
      }
    }
    ans += num;
  }
  cout << ans << endl;

  return (0);
}