#include<iostream>
#include<string.h>
#include<vector>
#include<list>
#include<stdio.h>
#include<math.h>
#include<iomanip>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << "debug " << x << endl;
using namespace std;

int main(){
    char c;
    int ans = 0, i = 0;
    char num[6] = {'\0'};
    while( cin.get(c) ){
        if(c >= '0' && c <= '9'){
            num[i++] = c;
        }else if(i != 0){
            ans += stoi(num);
            i = 0;
            char *b = num;
            rep(j,6)
                *b++ = '\0';
        }
    }
    cout << ans << endl;
}