#include <cstdio>
#include <cstring>
using namespace std;

int ans;
char buf[10000];

int main() {
  while (1) {
    if (scanf("%s", buf) != 1) break;

    int n = strlen(buf);
    int cur_num = 0;
    for (int i=0; i<n; i++) {
      char c = buf[i];
      if ('0' <= c && c <= '9') {
        cur_num = cur_num*10 + (c-'0');
      } else {
        ans += cur_num;
        cur_num = 0;
      }
    }

    ans += cur_num;
  }

  printf("%d\n", ans);
}