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

int main(){
  int i,j,n=0,ans=0;
  char str[81];
  while(cin >> str){
    for(i=0;str[i]!='\0';i++){
      if('0' <= str[i] && str[i] <= '9'){
	n += str[i] - '0';
	if(str[i+1] != '\0' && '0' <= str[i+1] && str[i+1] <= '9'){
	  n *= 10;
	}
	else if(str[i+1] == '\0' || '0' > str[i+1] || str[i+1] > '9'){
	  ans += n;
	  n = 0;
	}
      }
    }
  }
  cout << ans << endl;
  return 0;
}