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

int main(void){
  string s;
  int res = 0, n = 0;
  while(getline(cin,s)){
    for(int i = 0 ; i < s.size() ; i ++){
      if('0' <= s[i] && s[i] <= '9'){
	n = n * 10 + s[i] - '0';
      }else{
	res += n;
	n = 0;
      }
    }
  }
  cout<<res<<endl;
}