#include<iostream>
#include<cstring>
#include<cstdlib>
using namespace std;
int main(){
    int res=0;
    string str;
    while(cin>>str){
            char a[100];
            strcpy(a,str.c_str());
            for(int i=0;i<strlen(a);i++){
            if(isdigit(a[i])){
                int p=0;
                for(int j=i;j<strlen(a);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;

}