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

int main(){
    int len;
    char num[6] = {'\0'};
    int total = 0;
    char s[81];
    while(cin >> s){
        for(int i=0;i<strlen(s)-1;i++){
            len = 0;
            if(s[i] >= '0' && s[i] <= '9'){
                for(int j=i;j<i+5;j++){
                    if(!(s[i] >= '0' && s[i] <= '9')) break;
                    num[len] = s[j];
                    len++;
                }
            }
            total += atoi(num);
            i += len;
            memset(num,'\0',sizeof(num));
        }
    }
    cout << total << endl;
}