#include <iostream>
#include <sstream>
#include <string>
#include <cctype>
using namespace std;

int main(){
    string str,sub_str;
    int n=0,t;
    stringstream ss;

    while(getline(cin,str)){
        for(int i=0;i<str.length();i++){
            if(isdigit(str[i])){
                t=i;
                while(isdigit(str[++t]));
                sub_str=str.substr(i,t-i);
                i=t;
                ss<<sub_str;
                ss>>t;
                ss.clear();
                n+=t;
            }
        }
    }

    cout<<n<<endl;
}