#include <cstdio>
#include <iostream>
#include <algorithm>
#include <string>
using namespace std;
string s;
int main(void){
  int ans = 0;
  while(cin >> s){
    int c = 0;
    for(int i = 0; i < (int)s.size(); i++){
      if('0' <= s[i] && s[i] <= '9'){
	c *= 10;
	c += s[i] - '0';
      }else{
	ans += c;
	c = 0;
      }
    }
    ans += c;
  }
  cout << ans << endl;
}