#include<iostream>
#include<algorithm>
#include<vector>
#include<cstdio>
#include<cstring>
#include<climits>
#include<cmath>

#define f first
#define s second
#define mp make_pair

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()

typedef unsigned int uint;
typedef long long ll;

using namespace std;
int sumall(char *buff){
  bool flag = false;
  int ret = 0;
  int tmp = 0;
  while(*buff != '\0'){
    while(*buff != '\0' && !isdigit(*buff))
      buff++;
    tmp = 0;
    while(*buff != '\0' && isdigit(*buff)){
      tmp *= 10;
      tmp += *buff - '0';
      buff++;
    }
    ret += tmp;
  }
  return ret;
}

int main(){
  char buff[256];
  int ans = 0;
  while(cin>>buff){
    ans += sumall(buff);
  }
  cout << ans << endl;
}