#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main(){

    string input;
    vector<string> strings;
    int total=0;
    int n;

    cin>>input;

    for(int i=0;i<=input.size();i++){
        if(input[i]>='0'&&input[i]<='9'){
            n=n*10+input[i]-'0';
        }
        else{
        total+=n;
        n=0;
        }
    }

    cout<<total<<endl;

    return 0;
}
