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

int main(){

  string s;
  int ans = 0;

  while(cin >> s){

    for(int i=0;i<s.size();i++){

      int z = 0;

      while(s[i] >= '0' && s[i] <= '9'){
	z *= 10;
	z += s[i] - '0';
	i++;
      }

      ans += z;
    }
  }

  cout << ans << endl;
}