#include<iostream>
#include<cstring>
using namespace std;
int main(){
  char c[100];
  int ans=0;
  int h=0;
  while(cin>>c){
    for(int i=0;i<strlen(c);i++){
      if(c[i]-'0'>=0&&c[i]-'0'<=9){
	if(h!=0){
	  h *= 10;
	  h += c[i]-'0';
	}
	else if(h==0) h += c[i] - '0';
      }
      else if(h!=0){
	ans += h;
	h = 0;
      }
    }
  }
  cout << ans << endl;
  return 0;
}