#include <iostream>
#include <cstring>

using namespace std;

int main(void){
    int sum=0;
    int sum_t=0,len;
    int size;
    char str[81];
    
    while(cin>>str){
        len=strlen(str);
        for(int i=0;i<len;i++){
            if('0'<=str[i]&&str[i]<='9'){
                sum_t*=10;
                sum_t+=str[i]-'0';
            }else{
                sum+=sum_t;
                sum_t=0;
            }
        }
    }
    cout<<sum<<endl;
    return(0);
}