#include<iostream>
#include<cstring>
#include<cstdlib>
using namespace std;
int main(){
    string str;
    string b;
    while(cin>>b)str+=b;
    char a[10000];
    strcpy(a,str.c_str());
    int res=0;
    for(int i=0;i<strlen(a);i++){
        if(isdigit(a[i])){
            int p=0;
            for(int j=i;j<10000;j++){
                if(isdigit(a[j]))p++;
                else break;
            }
            char num[5]="0";
            strncpy(num,a+i,p);
            res+=atoi(num);
            i+=p;
        }

    }
    cout<<res<<endl;

}