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

int main(){
    string str;
    int number = 0;
    int sum = 0;
    while(getline(cin, str)){
        for(int i=0; i<=str.size(); ++i){
            if('0' <= str[i] && str[i] <= '9'){
                number *= 10;
                number += str[i] - '0';
            }else{
                sum += number;
                number = 0;
            }
        }
    }
    cout << sum << endl;
    return 0;
}