#include <bits/stdc++.h>
using namespace std;
int main(){
  int n=0,sum=0;
  char c;
  while((c=getchar())!=EOF){
    if(c>='0'&&c<='9'){
      n*=10;
      n+=(c-('0'));
    }
    else{
      sum+=n;
      n=0;
    }
  }
  cout<<sum<<endl;
}