#include <iostream>
#include <cstdio>
using namespace std;
int change(char);

int main(void) {
  int n=0, sum=0;
  char c;
  while(scanf("%c", &c) != EOF) {
    if('0' <= c && c <= '9') {
      n *= 10;
      n += change(c);
    }
    else {
      sum += n;
      n = 0;
    }
  }
  cout << sum << endl;
  return 0;
}

int change(char c) {
  int n;
  if(c == '0') n = 0;
  if(c == '1') n = 1;
  if(c == '2') n = 2;
  if(c == '3') n = 3;
  if(c == '4') n = 4;
  if(c == '5') n = 5;
  if(c == '6') n = 6;
  if(c == '7') n = 7;
  if(c == '8') n = 8;
  if(c == '9') n = 9;
  return n;
}