#include <iostream>
using namespace std;

int main() {
  char c;
  int a, pass;
  a = 0;
  pass = 0;
  while ((c=getchar())!=EOF) {
    if (isdigit(c)) {
      a *= 10;
      a += c - '0';
    } else if (a) {
      pass += a;
      a = 0;
    }
  } 
  pass += a;
  printf("%d\n", pass);
  return 0;
}