#include<iostream>
#include<string.h>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#define rep(i,n) for(i=0;i<n;i++)
using namespace std;
typedef pair<int, int> P;

char str[100];

int keta(int n){
  int i;
  int a=1;
  rep(i,n)
    a*=10;

  return a;
}

int main()
{
  int i,j,k;
  int sum=0;

  while(scanf("%s",str)!=EOF){
    rep(i,strlen(str))
      if(str[i]>='0' && str[i]<='9'){
	rep(j,strlen(str)-i)
	  if(str[i+j]<'0' || str[i+j]>'9')
	    break;
	j--;
	rep(k,j+1)
	  sum+=(str[i+j-k]-'0')*keta(k);
	i+=j;
      }
  }
  cout<<sum<<endl;
}