#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;

int main(){
  int cnt = 0;
  string s;
  while(cin >> s){
    for(int i = 0; i < s.size(); i++){
      if('0' <= s[i] && s[i] <= '9'){
        string num = "";
        while('0' <= s[i] && s[i] <= '9'){
          num += s[i];
          i++;
        }
        cnt += stoi(num);
      }
    }
  }
  printf("%d\n", cnt);
  return 0;
}