#include <iostream>
#include <string>

using namespace std;

int main(){
        string s;
        int sum = 0;
        while(cin >> s){
                int n = 0;
                int idx = 0;
                for(int i = 0; i < s.size(); i++){
                        if('0' <= s[i] && s[i] <= '9') n = n*10+s[i]-'0';
                        else if(n){
                                sum += n;
                                n = 0;
                        }
                }
                sum += n;
        }
        cout << sum << endl;
}