#include <cstdio>

using namespace std;

int main()
{
  char c;
  int n;
  while ((c = getchar()) != EOF) {
    if ('0' <= c && c <= '9') {
      int m = c - '0';
      while ((c = getchar()) != EOF && '0' <= c && c <= '9') {
	m = m * 10 + c - '0';
      }
      n += m;
    }
  }
  printf("%d\n", n);
  return 0;
}