#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<string.h>
using namespace std;
int main(){
    char word[500]={0};
    int total=0,N;
    while(scanf("%s",word)!=EOF){
        for(int i=0;i<strlen(word);i++){
            if(isdigit(word[i])){
                N=atoi(&word[i]);
                total+=N;
                for(;;){
                    if(isdigit(word[i+1]))i++;
                    else break;
                }
            }
        }
    }
    cout<<total<<endl;
    return 0;
}